Simple query in examine search not working for spe...
# help-with-umbraco
r
I have a "contact" document type that have properties title, address, zip, city, country.,.. index.searcher.CreateQuery(IndexTypes.Content).GroupedOr(new[] { "__NodeTypeAlias" }, new[] { "contact" }) .And().Field("country", "NO"); The country field is not getting added to the query. But when adding field "zip", "city", "title" to the query, it is working. Is "country" any special word. I have a document type "country". Is that an issue. Please help.
j
If you are using the standardanalyzer which you are unless you specifically set another one, then "no" is a stopword, which means it is removed from searches. Here are the stopwords: https://github.com/apache/lucenenet/blob/master/src/Lucene.Net.Analysis.Common/Analysis/Core/StopAnalyzer.cs#L52
r
Thanks Jemayn. I will change the logic to store and search for country name.