nothing is found. When changing the last_name query from west to westp, the customer is found.
We're using elasticsearch 1.4.2. Both fields are of type string no specific language analyzer is being used. Can it be that west is somehow being considered as expletive word?
Using explain: true in query doesn't give any information. Are there any analyzation queries available to unterstand search behaviour?
Hello,
do you maybe have a lot of other documents with last_name starting with "west" but first_name that doesn't start with "peter"? Have you tried playing around with the max_expansions option. Default is 50, meaning that if Westphal is after the first 50 terms that start with west in the inverted index, you don't get that document back. That might explain why adding the "p" makes it match.
I now set max_expansions to 100. Still not all matching documents are being found when using last_name : "west".
As far as I unterstand, max_expansions in combination with match_phrase_prefix determines the maximum number of existing distinct fields matching the prefix.
What bothers me is that there are 36 distinct last_name fields beginning with west. So I would expect that even the assumed max_expansions default of 50 must be enough in a match_phrase_prefix query and setting it to 100 must be far enough.
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.