Here is an example document being returned even though there are dates that fall within the range clause:
{
"is_active" : true,
"nonAvailability:
{
"date": "2018-11-03"
},
{
"date": "2018-11-04"
},
{
"date": "2018-11-05"
},
{
"date": "2018-11-06"
},
{
"date": "2018-10-24"
}
}
This is a good catch - I removed it all together but the query still does not work as expected on ES6.4.
@Peter_Steenbergen actually suggested I do this via a parent-child relationship, but my understanding of nested documents was that they essentially achieved the same thing in a single document, so I'm confused as to why a child type would solve this query.
Not sure why, but this morning reviewing this again, the query appears to be performing correctly. The availability object is updated frequently. Is it possible old data was stilled cached and was being served by the query? I'm not super familiar with the inner workings of ElasticSearch.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.