Hi I would like to index objects that look like that
{
uuid: "123",
clauses: [{ order: 1, uuid: "345"},{ order: 2, uuid: "567"},{ order: 3, uuid: "789"}]
}
Is there a way to write a query that matches all the objects that contain clauses with uuid: "345" and uuid: "789" but order of the second one is at most two bigger than first one?
So the above example would match but the next one wouldn't :
{
uuid: "999",
clauses: [{ order: 1, uuid: "345"},{ order: 2, uuid: "567"},{order: 3, uuid: "777"},{ order: 4, uuid: "789"}]
}
The reason is that order of "789" clause is 4 which is more than 2 bigger than "345" clause, which has order 1.
Any help is appreciated! Thanks, Michail