In the bool query, we have the following fields: must. must_not. should. filter. Must is analogous to the boolean AND, must_not is analogous to the boolean NOT, and should is roughly equivalent to the boolean OR. Note that should isn't exactly like a boolean OR, but we can use it to that effect. And we'll take a look at filter later on.
This is the NOT or minus (-) operator of the query DSL. In this case, we do a simple match query, looking for documents that contain the term "city." This is the must_not clause, so matching documents will be excluded. should. Up until now, we have been dealing with absolutes: must and must_not. Should is not absolute and is equivalent to0rAlr8. 6 63 409 110 467 184 268 492 498