Reputation: 477
I use lucene for searching.
For each doc in index I have some field called "uniqueIdentifier" with type string.
When I want to find all items with "uniqueIdentifier" == "haaglanden", I use the next code:
var searcher = Examine.ExamineManager.Instance.SearchProviderCollection["RegionsSearcher"];
var searchCriteria = searcher.CreateSearchCriteria(BooleanOperation.And);
var temp = searchCriteria.RawQuery("+uniqueIdentifier:" + uniqueIdentifier);
In temp I see :
LuceneQuery: {+(+uniqueIdentifier:haagland)}
But "haagland" != "haaglanden".
And I can not find my docs.
How can I build query with "haaglanden"?
Upvotes: 0
Views: 42
Reputation: 477
The cause was in analyzer.
Swiched Lucene.Net.Analysis.Nl.DutchAnalyzer to Lucene.Net.Analysis.Standard.StandardAnalyzer.
Upvotes: 0