Hi,
I am trying to filter accomodations by date.
mapping:
{"_doc":{"_source":{"enabled":true},"properties":{"object":{"properties":{"id""{"type":"integer","coerce":false},"capacity":{"type":"integer","coerce":false},"type_id":{"type":"integer","null_value":0,"coerce":false},"params":{"properties":{"param1":{"type":"integer","coerce":false},"param2":{"type":"integer","coerce":false},"param3":{"type":"integer","coerce":false},"param4":{"type":"integer","coerce":false}}}}},"unit":{"properties":{"id":{"type":"integer","coerce":false},"capacity":{"type":"integer","coerce":false},"type_id":{"type":"integer","null_value":0,"coerce":false},"params":{"properties":{"param1":{"type":"integer","coerce":false},"param2":{"type":"integer","coerce":false},"param3":{"type":"integer","coerce":false},"param4":{"type":"integer","coerce":false}}},"date":{"type":"nested","dynamic":false,"properties":{"date":{"type":"date"},"price":{"type":"float","coerce":false},"start":{"type":"boolean"},"end":{"type":"boolean"},"status":{"type":"integer","coerce":false}}}}},"location":{"properties":{"gps":{"type":"geo_point"},"l1":{"type":"integer","coerce":false},"l2":{"type":"integer","coerce":false},"l3":{"type":"integer","coerce":false},"l4":{"type":"integer","coerce":false}}},"es_status":{"type":"integer","coerce":false},"fulltext":{"properties":{"sk":{"type":"text"},"cs":{"type":"text"}}}},"dynamic":false}}
in unit.date has multiple objects
{date:"2018-06-19", status:1},{date:"2018-06-20", status:1},{date:"2018-06-21", status:1}
How can i filter parent (root) document where i need multiple dates with status=1
I tried script in bool query also. loop is not working