I have elastic search documents which look something like this:
{
"id": "1",
"quantityPerUnitOfMeasure": 16,
"availableQuantity": 12,
}
I'd like to compose a query which only returns documents where the availableQuantity is greater than it's own quantityPerUnitOfMeasure.
For example, if I have the following documents available:
[
{
"id": "1",
"quantityPerUnitOfMeasure": 16,
"availableQuantity": 12,
},
{
"id": "2",
"quantityPerUnitOfMeasure": 4,
"availableQuantity": 20,
},
{
"id": "3",
"quantityPerUnitOfMeasure": 40,
"availableQuantity": 50,
}
]
the query should return documents with the ids "2" and "3", but not return the document with id "1".
It's easy with
runtime_mappingsYour documents
Query with
runtime_mappingsResponse