I have an index of students. In my index, there is an attribute named class (1, 2, and 3 are the possible values). I want to check if the last 3 entries in last 30s is boy. The query work well. But the problem is, it returns true if 3 boys are present in class 1 or 2 or 3. What I want is, return true, if the last 3 consecutive entries of one of the class is 3. Means, return true if last 3 entries of class 1 is boy. return true if last 3 entries of class 2 is boy, like that. Return false if last 3 entries is like boy,boy,girl or boy,girl,boy etc. Is this possible?
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
I believe this is what @byronvoorbach was expecting here.
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.