I have some documents, indexed with Elasticsearch.
{ "name": "Item 1", "tags": [2,1,3] }
{ "name": "Item 2", "tags": [1,2,3] }
{ "name": "Item 3", "tags": [2,3,4] }
How can I make a query to filter these items by having tag 1 (integer) and moreover, range them by its position in tags array?
query: 1 => Item 2, Item 1
query: 2 => Item 1, Item 3, Item 2
question from:https://stackoverflow.com/questions/66049481/range-results-by-position-in-array-with-elasticsearch