A
A
Askar Fuzaylov2015-04-13 11:04:11
elasticsearch
Askar Fuzaylov, 2015-04-13 11:04:11

How to get records joined by one group in ElasticSearch?

Good day to all.
A question. All records in elasticsearch are grouped by one group field.
Example:

{
    "title": "Название 1",
    "text": "Текст на русском",
    "lang": "ru",
    "group": "qwe123"
}

{
    "title": "Title 1",
    "text": "English text",
    "lang": "en",
    "group": "qwe123"
}

These 2 records are joined by the group field.
How can I make it so that when searching, elastic gives me not only the records that match the query, but also all the records associated with the group found.
If I search for the word "Text" then I should get both entries.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2015-04-13
@mrRontgen

Elastica has well-written documentation about Aggregation.
www.elasticsearch.co/guide/en/elasticsearch/reference/1....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question