Answer the question
In order to leave comments, you need to log in
Elasticsearch search by range and other parameters?
Good afternoon!
There is a code in the script that searches for all products, sorted by id and range. The 'categories' parameter is also stored in the index, in which the values ​​are stored as an array, the category id in the value, that is, 'categories' => [ 0 => {categories id}, 1 => {categories id} ]
As well as the range with sorting search for more products by category id array? Tried to substitute in query, doc and other parameters, but does not filter.
Request example:
'sort' => ['id'],
'body' => !empty($gt) ? json_encode([
'query' => [
'range' => [
'id' => [
'gt' => $gt
]
]
]
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) : [],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question