I cannot figure out why the prefix query doesn't apply the same analyzer
that has been used when indexing the document.
E.g. indexing "ReaLise" puts "realise" into the index but searcing using a
prefix query like QueryBuilders.prefixQuery("fieldName", "ReaLise") doesn't
return anything as opposed to QueryBuilders.prefixQuery("fieldName",
"realise"), note the lower-case.
I will only be able to find terms that are in the index (that is terms which
have had the analyser applied), so why can the prefix query not apply it?
Is there any way in the Java API to specify that the prefix query should use
the analyser?
I read that Lucene had a method to say the prefix term was case in sensitive
( http://wiki.apache.org/lucene-java/LuceneFAQ#Are_Wildcard.2C_Prefix.2C_and_Fuzzy_queries_case_sensitive.3F
)
On Fri, Oct 7, 2011 at 1:41 PM, Trym trym@sigmat.dk wrote:
Hi
I cannot figure out why the prefix query doesn't apply the same analyzer
that has been used when indexing the document.
E.g. indexing "ReaLise" puts "realise" into the index but searcing using a
prefix query like QueryBuilders.prefixQuery("fieldName", "ReaLise") doesn't
return anything as opposed to QueryBuilders.prefixQuery("fieldName",
"realise"), note the lower-case.
I will only be able to find terms that are in the index (that is terms
which have had the analyser applied), so why can the prefix query not apply
it?
Is there any way in the Java API to specify that the prefix query should
use the analyser?
I read that Lucene had a method to say the prefix term was case in
sensitive ( LuceneFAQ - Apache Lucene (Java) - Apache Software Foundation
)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.