Alright guys, thanks!
I went for storing everything lowercase in DB. I also lowercased all solr
queries and only on client for UX purposes I applied the proper casing
logic.
Thanks for suggestions!
--
View this message in context:
http://lucene.472066.n3.nabble.com/finding-exact-case-insensiti
exact case insensitive matches on single and multiword
values
Geert-Jan and Erick, thanks!
What I tried first is making it work with string type, that works perfect
for all lowercase values!
What I do not understand is how and why I have to make the casing work at
the client, since the casing
> Then to the solution of tweaking the fieldtype for me to
> work.
> I have this right now:
>
> class="solr.TextField" sortMissingLast="true"
> omitNorms="true">
>
> class="solr.KeywordTokenizerFactory"/>
> class="solr.LowerCaseFilterFactory"/>
>
>
Geert-Jan and Erick, thanks!
What I tried first is making it work with string type, that works perfect
for all lowercase values!
What I do not understand is how and why I have to make the casing work at
the client, since the casing differs in the database. Right now in the
database I have values
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
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=
You are right, this is what I see when I append the debug query (very very
useful btw!!!) in old situation:
city:den title:haag
PhraseQuery(themes:"hotel en restaur")
I then changed the schema.xml to:
I then tried adding parentheses:
The root of your problem, I think, is fq=city:den+haag which parses into
city:den +defaultfield:haag
Try parens, i.e. city:(den haag).
Attaching &debugQuery=on is often a way to see thing like this quickly
Also, if you haven't seen the analysis page from the admin page, it's really
valuable