c# - Why is this implementaion of Lucene not returning any results? -


i'm adding simpleluucene app wrapper layer makes lucene simpler implement in basic situations, hoping improve query speed. when did simplistic working concept wire code not results. doing wrong?

ps: left out code create indexes. has been run , cfs , fdt files have data.

var searchcriteria = new search.helpers.mapping().maptomodel(postdata); var searcher = new directoryindexsearcher(     new directoryinfo(@"c:\search.index"),      true); var query = new termquery(     new term("situs", "1144 air cargo ave, sarasota, fl, 34243"));  var searchservice = new searchservice(searcher); var luceneresults = searchservice.searchindex(query); 

the query object termquery try match input value exactly is. difference between input , indexed values (such fl instead of fl) result in 0 match. casing, spaces , symbols need identical lucene return matching document. suggest pre-processing input , indexed value before hand (i.e. lower-casing strings before indexing, , search input) avoid subtle differences.


Comments