I am trying to register a percolator query that would analyze an URI field
to check whether or not it contains a given expression, defining at the
same time the analyzer used :
But it would be better if I could use simple query strings with analyzers
since they best fit my main goal.
Le mercredi 12 février 2014 15:10:16 UTC+1, Dunaeth a écrit :
Hi,
I am trying to register a percolator query that would analyze an URI field
to check whether or not it contains a given expression, defining at the
same time the analyzer used :
The value "http://www.test.foo" is indexed using the standard analyzer (or
whatever is defined in your mapping for the uri_field, if you have one). So
in the case of the standard analyzer, this is broken down to ("http",
"www.test.foo").
The search value "test" is analyzed using the simple analyzer, then it is
executed against the indexed value "http://www.test.foo" which was
analyzed using the standard analyzer. Note that the simple analyzer is not
applied to the indexed value "http://www.test.foo". It is only applied to
the query value "test". You cannot influence the index analyzer at query
time. You can only influence the search analyzer.
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.