How to write a Elasticsearch query


Select all Messages(Posts & Comments) created between date1-date2(inclusive) by Persons located in country1 or country2, Select the creators (Persons) and the Tags of these Messages.
Split these Persons,Tags and Messages into a 5 level grouping. of country of Person.
2.month message was created.
3.gender of person.
4.age group of Person, defined as years between person's birthday and end of simulation (2013-01-01),divided by 5,rounded down.
5. name of tag attached to message.

Considering only those groups where number of messages greater than 100.

Can someone help me in writing it as Elasticsearch query?

(David Pilato) #2

You can't do joins in elasticsearch.

So the question is less about the query but more about the modelling of your data.

For example, it seems that what you want to search for are messages. In that case index messages.
And you need the author name of the message to search? Then add the author name in the message object.


Yeah I got your point.
Thank you so much for the response :slight_smile:

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.