By default Lucene will strip out certain "stop words" these are noise words like "and, or, the" that are not indexed ot save space on indexes. To get rid of the stop words, you need to use a different analyzer for the indexer. I think the default is the StandardAnalyzer which has stop words, you could try the SimpleAnalyzer, which I think doesn't have stop words?
Examine query stripping out words
Hi
I have examine up and running however my query is having words stripped out
for example:
I am searching on "man on the moon" with the following line of code, the variable "searchTerm" should contain "man on the moon":
var Searcher = ExamineManager.Instance.SearchProviderCollection["MySearcher"];
var searchCriteria = Searcher.CreateSearchCriteria();
var query = searchCriteria.Field("Name", searchTerm).Compile();
however, the query is generated as this when I debug:
{ SearchIndexType: , LuceneQuery: +Name:"man moon" }
notice how it has removed the words "on the" from the searchTerm. why is this? any ideas?
By default Lucene will strip out certain "stop words" these are noise words like "and, or, the" that are not indexed ot save space on indexes. To get rid of the stop words, you need to use a different analyzer for the indexer. I think the default is the StandardAnalyzer which has stop words, you could try the SimpleAnalyzer, which I think doesn't have stop words?
is working on a reply...