# Percolation exact match

**URL:** <https://discuss.elastic.co/t/percolation-exact-match/211759>\
**Category:** Elasticsearch\
**Created:** [December 13, 2019, 8:11am UTC](https://discuss.elastic.co/t/percolation-exact-match/211759 "2019-12-13T08:11:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtryan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jtryan/32/45922_2.png) [@jtryan](https://discuss.elastic.co/u/jtryan)\
**Post date:** [December 13, 2019, 8:11am UTC](https://discuss.elastic.co/t/percolation-exact-match/211759/1 "2019-12-13T08:11:27Z")

</div>

I've been following the guide linked below:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-percolate-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-percolate-query.html)

In these examples `bonsai` or `tree` will match any documents as illustrated in the "percolating multiple documents" example further down the page. How do you do exact matches where all words in the registered percolator queries have to be present?

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [December 14, 2019, 12:14pm UTC](https://discuss.elastic.co/t/percolation-exact-match/211759/2 "2019-12-14T12:14:23Z")

</div>

The default behavior of the `match` query (used in the example) is to use the OR operator. You could change that into an AND operator by registering the percolator query like this:

```auto
PUT /my-index/_doc/1?refresh
{
  "query": {
    "match": {
      "message": {
        "query": "bonsai tree",
        "operator": "and"
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 11, 2020, 12:14pm UTC](https://discuss.elastic.co/t/percolation-exact-match/211759/3 "2020-01-11T12:14:33Z")

</div>

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