Lucene.NET kicks butt. I LUV IT! Truly. Boolean, exact phrase, wildcard, can use in combination, and fast! I was so glad I decided to use those pieces from ScottW's splendid
0.96 source (or whatever its designation.)
So I'm groovin' on this beefy blog searching when I discover that only my blog body content is being searched. The titles weren't included in the search. The Librarian in me was aghast.
There had to be a way to include the title in the search. The wise coders behind the Lucene engine had to have included that capability, but where?
I found the answer in the DotText.Search.EntryData.cs class and the CreateDoc method where the index documents are formed. The RawPost field had to be modified to include any additional fields. It was here that I added the post Title field from the datareader, and for a community blog environment, added author as well. It would have been nice to add categories, but that would have been messier. I'd like to add that capability, too, and perhaps concatenating them in the SQL blog_aggregate_search proc, return them in the reader and append to the RawPost field. Yeah, that would probably work.
The original line of code is commented out with the multi-field version listed afterward.
//doc.Add(Field.Text(SearchConfiguration.RawPost,regexStripHTML.Replace(body,string.Empty)));
doc.Add(Field.Text(SearchConfiguration.RawPost,regexStripHTML.Replace(body,string.Empty) + " | Post Title: " + title));