This project is read-only.

How is Search Implemented?

Dec 2, 2009 at 3:25 AM

I know I have all the source code, but I'm still developing my ASP.NET skills and the BlogEngine source is a little overwhelming.

If someone could give me a bird's eye description of how BlogEngine implements search, I may be able to save a lot of time in understanding how that's implemented.


Dec 2, 2009 at 11:27 AM

All the posts in BE are cached in memory.  When a Search is done, the Search system looks for word matches across all the posts.  Word matches appearing in blog Titles have more weight than word matches in the body of the blog posts.  That's an overview ... it's not much more complicated than that, however.  The Search code is in the BE core ... basically all inside this one file:


Oct 19, 2010 at 1:41 AM

All the posts in BE are cached in memory? So what happens when you re-start IIS?

Hi All!

The behavior I'm getting after an IIS re-start is that the Search will search the title of the blogs but not the contents of the blog nor the tags. Clicking on the Category and the Tag links works.

 Is this the expected behaviour?


Oct 19, 2010 at 3:55 AM

If IIS restarts, the posts are cached again -- the same process takes place that occurred when the IIS application started the first time.

I don't think Tags or Categories are included in the search.  What is included in the search is:

  • Post titles and content
  • Page titles and content
  • Comment content and author name