lucene - PrefixQuery case sensitive? -


i have untokenized field in index file. i'm using prefixquery values. i'm using auto suggesting(when give keyword start suggesting relevant data).

for example: field name 'country'. has list of countries values australia, america, india, singapore, south africa, new zealand...(with title case)

when give query string(input) 'a', not suggesting countries.. instead if give 'a' means suggesting australia, america...

how can overcome case problem? wrong this??

your appreciated...

thanks

perumal s

from http://wiki.apache.org/lucene-java/lucenefaq#are_wildcard.2c_prefix.2c_and_fuzzy_queries_case_sensitive.3f

are wildcard, prefix, , fuzzy queries case sensitive?

no, not default. unlike other types of lucene queries, wildcard, prefix, , fuzzy queries not passed through analyzer, component performs operations such stemming , lowercasing. reason skipping analyzer if searching "dogs*" not want "dogs" first stemmed "dog", since match "dog*", not intended query. these queries case-insensitive anyway because queryparser makes them lowercase. behavior can changed using setlowercaseexpandedterms(boolean) method.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -