Users call this URL on my site: /?search=1&city=den+haag or even /?search=1&city=Den+Haag (casing of ctyname can be anything)
Under water I call Solr: http://localhost:8983/solr/db/select/?indent=on&facet=true&fq=city:den+haag&q=*:*&start=0&rows=25&fl=id,title,friendlyurl,city&facet.field=city but this returns 0 results, even though I KNOW there are exactly 54 records that have an exact match on "den haag" (in this case even with lower casing in DB). citynames are stored with various casings in DB, so when searching with solr, the search must ignore casing. my schema.xml <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true" /> <field name="city" type="string" indexed="true" stored="true"/> To check what was going on, I opened my analysis.jsp, for field <name> I provide: "city" for Field value (Index) I provide: "den haag" When I analyze this I get: "den haag" So that seems correct to me. Why is it that no results are returned? My requirements summarized: - I want to search independant of case on cityname: when user searches on "DEn HaAG" he will get the records that have value "Den Haag", but also records that have "den haag" etc. - citynames may consists of multiple words but only an exact match is valid, so when user searches for "den", he will not find "den haag" records. And when searched on "den haag" it will only return match on that and not other cities like "den bosch". How can I achieve this? I think I need a new fieldtype in my schema.xml, but am not sure which tokenizers and analyzers I need, here's what I tried: <fieldType name="exactmatch" class="solr.TextField" positionIncrementGap="100" > <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_dutch.txt" /> <filter class="solr.ISOLatin1AccentFilterFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> Help is really appreciated! -- View this message in context: http://lucene.472066.n3.nabble.com/finding-exact-case-insensitive-matches-on-single-and-multiword-values-tp2012207p2012207.html Sent from the Solr - User mailing list archive at Nabble.com.