Elasticsearch autocomplete- / suggest by token

After I had read > 100 articles, blog-posts, documentation pages and much
more I'll ask the community but still wonder where my blind spot is, if I
had overseen the obvious.

I want to create search-suggestions on how to complete a term based on
tokens, similar to google like autocomplete but only with one token or
word.

I'd like to search across filenames who will get tokenized. E.g.
"BRAND_Connect_A1233.jpg" gets tokenized into "brand", "connect", "a1234"
and "jpg".

Now I'd like to ask for some suggestion for e.g. "Con". The suggestion
should deliver the matching tokens, not the full filename:

  • Connect
  • Contour
  • Concept
  • ...

The suggestion for "A12" should be "A1234", "A1233", "A1233" ...

I created a complete test scenario, available at Gist:

Some remarks about the example:

  • Working with queries, facet and filters works fine. The example is a
    minimized version of a much more complex scenario.
  • Various approaches to get the desired suggestion does not deliver the
    expected results. I had tried to name the analyzers and tried various
    combinations of analyzers and wildcards.

Any help, pointer or working example will be highly appreciated.

Kind regards,
Christian

--
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/1daf5301-7048-43ea-9ee2-d208025e7922%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Christian,

Have you found how to solve your question?..It's really hard to think that
is not possible to do that with Elasticsearch. We have been also trying to
achieve that, but no luck till today.

Thanks in advance,

Regards,

Izzat

El lunes, 30 de junio de 2014, 10:32:54 (UTC+1), Christian Rütgers escribió:

After I had read > 100 articles, blog-posts, documentation pages and much
more I'll ask the community but still wonder where my blind spot is, if I
had overseen the obvious.

I want to create search-suggestions on how to complete a term based on
tokens, similar to google like autocomplete but only with one token or
word.

I'd like to search across filenames who will get tokenized. E.g.
"BRAND_Connect_A1233.jpg" gets tokenized into "brand", "connect", "a1234"
and "jpg".

Now I'd like to ask for some suggestion for e.g. "Con". The suggestion
should deliver the matching tokens, not the full filename:

  • Connect
  • Contour
  • Concept
  • ...

The suggestion for "A12" should be "A1234", "A1233", "A1233" ...

I created a complete test scenario, available at Gist:
Elasticsearch autocomplete or autosuggest by token · GitHub

Some remarks about the example:

  • Working with queries, facet and filters works fine. The example is a
    minimized version of a much more complex scenario.
  • Various approaches to get the desired suggestion does not deliver
    the expected results. I had tried to name the analyzers and tried various
    combinations of analyzers and wildcards.

Any help, pointer or working example will be highly appreciated.

Kind regards,
Christian

--
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/15cf562b-46f9-49db-b203-5e1076237b65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dear Izzat,

finally yes, we had solved the problem.

The solution consist of the proper combination of mapping and query.
I'll attach some examples, hope this will help you.

dam_mapping.txt: The mapping.

dam_query.txt: A typical query with two query strings and some facets

dam_query_result.txt: The result of the query.

Kind regards,

Christian Rütgers
Head of interactive & IT

grintsch communications GmbH & Co. KG

Desk +49 (0)221 / 93 70 63-27
Fax +49 (0)221 / 93 70 63-80
christian.ruetgers@grintsch.com mailto:christian.ruetgers@grintsch.com

Am 16.03.2015 um 13:35 schrieb Izzat Sabbagh Rodríguez:

Hi Christian,

Have you found how to solve your question?..It's really hard to think
that is not possible to do that with Elasticsearch. We have been also
trying to achieve that, but no luck till today.

Thanks in advance,

Regards,

Izzat

El lunes, 30 de junio de 2014, 10:32:54 (UTC+1), Christian Rütgers
escribió:

After I had read > 100 articles, blog-posts, documentation pages
and much more I'll ask the community but still wonder where my
blind spot is, if I had overseen the obvious.

I want to create search-suggestions on how to complete a term
based on tokens, similar to g*oogle like autocomplete* but only
with one token or word.

I'd like to search across filenames who will get tokenized. E.g.
"BRAND_Connect_A1233.jpg" gets tokenized into "brand", "connect",
"a1234" and "jpg".

Now I'd like to ask for some suggestion for e.g. "*Con*". The
suggestion should deliver the matching tokens, not the full filename:

  * Connect
  * Contour
  * Concept
  * ...

The suggestion for "*A12*" should be "A1234", "A1233", "A1233" ...

I created a complete test scenario, available at Gist:
https://gist.github.com/165a707a1e628caac73d.git
<https://gist.github.com/165a707a1e628caac73d.git>

Some remarks about the example:

  * Working with queries, facet and filters works fine. The
    example is a minimized version of a much more complex scenario.
  * Various approaches to get the desired suggestion does not
    deliver the expected results. I had tried to name the
    analyzers and tried various combinations of analyzers and
    wildcards.

Any help, pointer or working example will be highly appreciated.

Kind regards,
Christian

--
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/yiebM3dm4EE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com
mailto:elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/15cf562b-46f9-49db-b203-5e1076237b65%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/15cf562b-46f9-49db-b203-5e1076237b65%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/5506F6F6.9030904%40grintsch.com.
For more options, visit https://groups.google.com/d/optout.

Thank you very much Christian¡¡¡

El lunes, 16 de marzo de 2015, 15:30:24 (UTC), Christian Rütgers escribió:

Dear Izzat,

finally yes, we had solved the problem.

The solution consist of the proper combination of mapping and query. I'll
attach some examples, hope this will help you.

dam_mapping.txt: The mapping.

dam_query.txt: A typical query with two query strings and some facets

dam_query_result.txt: The result of the query.

Kind regards,

Christian Rütgers
Head of interactive & IT

grintsch communications GmbH & Co. KG

Desk +49 (0)221 / 93 70 63-27
Fax +49 (0)221 / 93 70 63-80
christian...@grintsch.com <javascript:>

Am 16.03.2015 um 13:35 schrieb Izzat Sabbagh Rodríguez:

Hi Christian,

Have you found how to solve your question?..It's really hard to think
that is not possible to do that with Elasticsearch. We have been also
trying to achieve that, but no luck till today.

Thanks in advance,

Regards,

Izzat

El lunes, 30 de junio de 2014, 10:32:54 (UTC+1), Christian Rütgers
escribió:

After I had read > 100 articles, blog-posts, documentation pages and
much more I'll ask the community but still wonder where my blind spot is,
if I had overseen the obvious.

I want to create search-suggestions on how to complete a term based on
tokens, similar to google like autocomplete but only with one token or
word.

I'd like to search across filenames who will get tokenized. E.g.
"BRAND_Connect_A1233.jpg" gets tokenized into "brand", "connect", "a1234"
and "jpg".

Now I'd like to ask for some suggestion for e.g. "Con". The suggestion
should deliver the matching tokens, not the full filename:

  • Connect
  • Contour
  • Concept
  • ...

The suggestion for "A12" should be "A1234", "A1233", "A1233" ...

I created a complete test scenario, available at Gist:
Elasticsearch autocomplete or autosuggest by token · GitHub

Some remarks about the example:

  • Working with queries, facet and filters works fine. The example is
    a minimized version of a much more complex scenario.
    - Various approaches to get the desired suggestion does not deliver
    the expected results. I had tried to name the analyzers and tried various
    combinations of analyzers and wildcards.

Any help, pointer or working example will be highly appreciated.

Kind regards,
Christian

--
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/yiebM3dm4EE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/15cf562b-46f9-49db-b203-5e1076237b65%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/15cf562b-46f9-49db-b203-5e1076237b65%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/cb535ab5-b57a-424e-81f7-ef12c729d036%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.