Operator "and" does not work

Here is the query

{
  "query": {
    "match": {
      "english": {
        "query" : "all this", 
        "operator": "and"
      }
    }
  }
}

I expect the result contains "both" all and "this".
But the result can contain only "all", like this

"hits": [
      {
        "_index": "words_v1",
        "_type": "words",
        "_id": "AVv5tQ4oIOyYfPowNbTQ",
        "_score": 4.9961786,
        "_source": {
          "english": "It's all I can do"
          "sourceTitle": "Arrival"
        }
      }

Any idea why the operator "and" does not work?

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

I'd say that this is probably a stopword and skipped by the standard analyzer.
So only all is checked.

Check what the _analyze API is giving.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.