I have documents similar to
{
"name": "A",
"start": 5,
"end": 10
},
{
"name": "B",
"start": 1,
"end": 10
},
{
"name": "C",
"start": 20,
"end": 30
}
I also have a value X (say, 7). I need to look for documents such that start < X < end. In the example above, this would yield two documents (with name equal to A and B).
I do not know how to to formulate the search query: the range query which initially seemed to be the right one actually looks for documents which meet a criterion "greater than" / "smaller than" passed in the query - which is the opposite of what I want to do.
The following two
rangequeries would work