Binh, You were right! That worked perfectly. I added a front edge ngram filter along with a shingles filter and switched to the match query, and the results have been great.
Is this an ideal set up for autocomplete? Do you have any other suggestions? I combine my shingle+ngrams analyzer based query in a boolean query with another query that uses a keyword analyzer on the index and a shingle analyzer on search end, to increase the weighting of exact matches. I would also like it if, in my search, it would weight earlier terms higher than later terms (ie a search for Bear Creek would prefer results with Bear over results with Creek). Any suggestions on this? The Elasticsearch Api is pretty amazing when you get things working correctly, but it sometimes feels like like a lot of trial and error. Getting close though! - Elliott On Wed, Jan 29, 2014 at 6:20 PM, Binh Ly <[email protected]> wrote: > Elliot, you're on the right path. However, the match_phrase_prefix query > will then look at the positions of your terms and find matches only when > all the analyzed terms are found as well as taking into account the exact > sequence of the terms. That explains why you're not matching like you > expect. If you change your query to a match query, you'll see immediately > that it will match like you expected. However, the match query does not to > prefix matches so you'll need to take care of that some other way (like for > example perhaps using an edge ngram filter). > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "elasticsearch" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/elasticsearch/boU5OEkJlsw/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/1e0fb814-1334-465c-a5cd-84a538491def%40googlegroups.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCt%2BFsN-QG-sbMTXpuftYwm7yJxYZ2zs06_sP%3DYixNB4dkz1g%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
