Answer the question
In order to leave comments, you need to log in
How are AND, OR, NOT implemented in Elasticsearch?
There are products that are discontinued and you can buy them only from existing stocks. For example, the document can be simplified to
```json
{
"archived": true,
"total": 10
}
```
Elastic 7.5 How to build a query to select all products other than those with "archived": true AND "total" ": != 0? Somewhere I don’t catch up on how to correctly resolve AND, OR, NOT nesting Boolean Query.
Answer the question
In order to leave comments, you need to log in
Hi, basically
should is or,
must is and.
[query] => Array
(
[bool] => Array
(
[should] => Array
(
[0] => Array
(
[bool] => Array
(
[must] => Array
(
[0] => Array
(
[match] => Array
(
[values.attribute] => 15
)
)
[1] => Array
(
[match] => Array
(
[values.value_string] => 64
)
)
)
)
)
[1] => Array
(
[bool] => Array
(
[must] => Array
(
[0] => Array
(
[match] => Array
(
[values.attribute] => 15
)
)
[1] => Array
(
[match] => Array
(
[values.value_string] => 32
)
)
)
)
)
)
)
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question