Z
Z
zaartix2016-03-29 00:51:12
elasticsearch
zaartix, 2016-03-29 00:51:12

Elasticsearch, is it possible to give a summary of the values ​​​​of a particular field along with the output?

There is an index for 5 million records with a different set of fields, one of them is an array of categories related to a particular document. The user enters a text query, I do a full-text search on the corresponding field, but at the same time I also want to "suggest" the most likely category that he is looking for. Those. Of course, this can be done by bypassing all the results received and counting the number of each category encountered, but it seems to me that elastic can do something similar much faster.
It is not necessary to write a ready-made request, tell me at least a direction or a link to a section in the documentation.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
exenza, 2016-03-29
@zaartix

Elastic has a Suggesters feature . Watched?
Looks like Context suggester will work for you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question