Autocomplete rest of query: Do not propose shorter queries?

Hi Everyone,

I have put together some auto complete functionality based around the blog
posted on ES page (http://www.elasticsearch.org/blog/you-complete-me/). I
use the following to create the index.

PUT test_index
{
"mappings": {
"query" : {
"properties" : {
"product" : { "type" : "string" },
"name_suggest" : {
"type" : "completion"
}
}
}
}

Everything works fine except for 1 experience issue. That is for example if
I search for xbox 360, xbox one is also considered a relevant suggestion. I
would prefer if the autocomplete terms returned only contained the previous
characters entered for the search. For example xbox 360 xbox 360 controller
etc. The index contains a list of search terms.

Can anyone suggest ways of doing this? Very unfamiliar with the ES API.

--
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/eece9c6f-75be-4046-9af1-b279a23a3ed6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hey,

can you create a gist as an example, how you are indexing your data? My
assumption is, that you may want to use the whitespace analyzer instead of
the simple analyzer, as that one removes numbers. So your query "xbox 360"
becomes "xbox" and therefore "xbox one" is returned as well.

--Alex

On Thu, Mar 20, 2014 at 7:29 PM, Steven sbourke@gmail.com wrote:

Hi Everyone,

I have put together some auto complete functionality based around the blog
posted on ES page (Elasticsearch Platform — Find real-time answers at scale | Elastic). I
use the following to create the index.

PUT test_index
{
"mappings": {
"query" : {
"properties" : {
"product" : { "type" : "string" },
"name_suggest" : {
"type" : "completion"
}
}
}
}

Everything works fine except for 1 experience issue. That is for example
if I search for xbox 360, xbox one is also considered a relevant
suggestion. I would prefer if the autocomplete terms returned only
contained the previous characters entered for the search. For example xbox
360 xbox 360 controller etc. The index contains a list of search terms.

Can anyone suggest ways of doing this? Very unfamiliar with the ES API.

--
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/eece9c6f-75be-4046-9af1-b279a23a3ed6%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/eece9c6f-75be-4046-9af1-b279a23a3ed6%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/CAGCwEM9FvwPXkJCkAXRfL6yYAjBMt%2BhDuuFnXbnu%2BR%3DS5Xk__g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.