Arrrgh, Geert-Jan is right, that't the 15th time at least this has tripped me up.
I'm pretty sure that text will work if you escape the space, e.g. city:(den\ haag). The debug output is a little confusing since it has a line like city:den haag which almost looks wrong... but it worked out OK on a couple of queries I tried. Geert-Jan is also right in that filters aren't applied to string types so there's two possibilities, either handle the casing on the client side as he suggests and use string or make the text type work. Sorry for the confusion Erick On Fri, Dec 3, 2010 at 11:54 AM, Geert-Jan Brits <gbr...@gmail.com> wrote: > when you went from strField to TextField in your config you enabled > tokenizing (which I believe splits on spaces by default), > which is why you see seperate 'words' / terms in the > debugQuery-explanation. > > I believe you want to keep your old strField config and try quoting: > > fq=city:"den+haag" or fq=city:"den haag" > > Concerning the lower-casing: wouldn't if be easiest to do that at the > client? (I'm not sure at the moment how to do lowercasing with a strField) > . > > Geert-jan > > > 2010/12/3 PeterKerk <vettepa...@hotmail.com> > > > > > > > You are right, this is what I see when I append the debug query (very > very > > useful btw!!!) in old situation: > > <arr name="parsed_filter_queries"> > > <str>city:den title:haag</str> > > <str>PhraseQuery(themes:"hotel en restaur")</str> > > </arr> > > > > > > > > I then changed the schema.xml to: > > > > <fieldType name="myField" class="solr.TextField" sortMissingLast="true" > > omitNorms="true"> > > <analyzer> > > <tokenizer class="solr.KeywordTokenizerFactory"/> > > <filter class="solr.LowerCaseFilterFactory"/> > > </analyzer> > > </fieldType> > > > > <field name="city" type="myField" indexed="true" stored="true"/> <!-- > used > > to be "string" --> > > > > > > I then tried adding parentheses: > > > > > 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 > > also tried (without +): > > 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 > > > > Then I get: > > > > <arr name="parsed_filter_queries"> > > <str>city:den city:haag</str> > > </arr> > > > > And still 0 results > > > > But as you can see the query is split up into 2 separate words, I dont > > think > > that is what I need? > > > > > > -- > > View this message in context: > > > http://lucene.472066.n3.nabble.com/finding-exact-case-insensitive-matches-on-single-and-multiword-values-tp2012207p2012509.html > > Sent from the Solr - User mailing list archive at Nabble.com. > > >