Elasticsearch | Query over array of objects -


lets have object in es such as:

{   name: "calendar";   events: [     {       birthday: "1992-10-09",       graduation: "2018-06-15",       wedding: "2016-12-12"     }   ]  } 

is there way can query on events array find element in events array passed current date.

so far have:

get /index/type/_search {   "query": {     "range" : {       "events" : {         "gte" : "now"       }     }   } } 

but not iterate on each object in array , return name of event. scenario should return object graduation: "2018-06-15". help!

you can use nested datatypes store nested documents inside parent document. , query nested types can use nested query.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -