# Do match\_phrase\_prefix queries support the zero\_terms\_query parameter?

**URL:** <https://discuss.elastic.co/t/do-match-phrase-prefix-queries-support-the-zero-terms-query-parameter/206442>\
**Category:** Elasticsearch\
**Created:** [November 4, 2019, 4:43pm UTC](https://discuss.elastic.co/t/do-match-phrase-prefix-queries-support-the-zero-terms-query-parameter/206442 "2019-11-04T16:43:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fheathrenn](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@fheathrenn](https://discuss.elastic.co/u/fheathrenn)\
**Post date:** [November 4, 2019, 4:43pm UTC](https://discuss.elastic.co/t/do-match-phrase-prefix-queries-support-the-zero-terms-query-parameter/206442/1 "2019-11-04T16:43:03Z")

</div>

According to [the current documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query-phrase-prefix.html), match phrase prefix queries support the zero\_terms\_query parameter. However, if I attempt to set this parameter to "all" in a query, I get an error of type parsing\_exception with reason "[match\_phrase\_prefix] query does not support [zero\_terms\_query]".

The cURL I'm using:

```
curl -X GET "localhost:9200/events/_search?pretty" -H 'Content-Type: application/json' -d'
{
    "query": {
        "match_phrase_prefix" : {
            "name" : {
                "query" : "page",
                "analyzer" : "english",
                "zero_terms_query" : "all"
            }
        }
    }
}
'

```

What am I doing wrong?

Thanks.

---

<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:** [December 2, 2019, 4:43pm UTC](https://discuss.elastic.co/t/do-match-phrase-prefix-queries-support-the-zero-terms-query-parameter/206442/2 "2019-12-02T16:43:07Z")

</div>

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