Completion suggester sorting


(Facundo Olano) #1

Hi, I'm using the completion suggester for an autocomplete API. I need it
to autocomplete on middle words, so for example "Siberian Tiger" should be
a suggestion for "tig". To accomplish that, following the documentation,
what I do is to use multiple inputs for each term, so I index "Siberian",
"Tiger" and also "Siberian Tiger" (so I get the result if the term is
"siberian tig").

Now, what doesn't work entirely for me in this case is the result ordering
I get. Assuming equal weights, for "tig" It is something like:

"Bengal Tiger"
"Sand Tiger Shark"
"Siberian Tiger"
"Tiger Salamander"
"Tiger Shark"
"Tiger"

That is an alphabetical ordering. I'd rather like to get the terms closer
to the input string first, like:

"Tiger"
"Tiger Salamander"
"Tiger Shark"
"Bengal Tiger"
"Sand Tiger Shark"
"Siberian Tiger"

I realize this can't be accomplished with my current setup, but haven't
found an alternative either, is there any?

Thanks,
Facuindo.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKEP69VwQgKtf_iGh3a0taVP_B80WGLbrvm88M5F1qsSopkKTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(chimpsarehungry) #2

A prefix_length: 1 will give you just the ones that start with T. But that
won't really solve your problem.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1c2f0980-8cb9-409a-aa03-b6680ee0a1ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Alexander Reelsen) #3

Hey,

could you possible use different weights to have your custom scoring? That
might be possible when you are using an own index for suggestions, so you
could have more inputs.

--Alex

On Tue, Apr 22, 2014 at 2:41 PM, Shane Neeley sneeley@molecularmatch.comwrote:

A prefix_length: 1 will give you just the ones that start with T. But that
won't really solve your problem.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1c2f0980-8cb9-409a-aa03-b6680ee0a1ab%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/1c2f0980-8cb9-409a-aa03-b6680ee0a1ab%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-Knf2%2BokCZ8zma6yBdwo8n9hwvhJ89DmfRESc64vOxaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #4