# Elasticsearch 7.4.2 returning pinned-query not supported?

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-4-2-returning-pinned-query-not-supported/238629>\
**Category:** Elasticsearch\
**Created:** [June 25, 2020, 9:41am UTC](https://discuss.elastic.co/t/elasticsearch-7-4-2-returning-pinned-query-not-supported/238629 "2020-06-25T09:41:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Russell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dave_russell/32/42250_2.png) [@Dave\_Russell](https://discuss.elastic.co/u/Dave_Russell)\
**Post date:** [June 25, 2020, 9:41am UTC](https://discuss.elastic.co/t/elasticsearch-7-4-2-returning-pinned-query-not-supported/238629/1 "2020-06-25T09:41:25Z")

</div>

```auto
 {
  "name" : "node-test-1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "5BDsy2RNQwioVSKUe5ZJrg",
  "version" : {
    "number" : "7.4.2",
    "build_flavor" : "oss",
    "build_type" : "deb",
    "build_hash" : "2f90bbf7b93631e52bafb59b3b049cb44ec25e96",
    "build_date" : "2019-10-28T20:40:44.881551Z",
    "build_snapshot" : false,
    "lucene_version" : "8.2.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

```

But when I run a pinned query:

```auto
{
  "track_total_hits": true,
  "query": {
    "pinned": {
      "ids": [
        "123"
      ],
      "organic": {
        "query_string": {
          "query": "oranges"
        }
      }
    }
  },
  "size": 20
}

```

I get:

```auto
{

* "error": {
  * "root_cause": [
    * {
      * "type": "parsing_exception",
      * "reason": "no [query] registered for [pinned]",
      * "line": 1,
      * "col": 44}],
  * "type": "parsing_exception",
  * "reason": "no [query] registered for [pinned]",
  * "line": 1,
  * "col": 44},
* "status": 400
}

```

On a different instance of 7.4.2 the same query works fine.  
What could be the issue?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 25, 2020, 10:26am UTC](https://discuss.elastic.co/t/elasticsearch-7-4-2-returning-pinned-query-not-supported/238629/2 "2020-06-25T10:26:08Z")

</div>

Pinned queries are not available in the oss build but in the default distribution which includes this feature within the basic (free) license. See [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-pinned-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-pinned-query.html) and [https://www.elastic.co/subscriptions](https://www.elastic.co/subscriptions).

---

<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:** [July 23, 2020, 10:26am UTC](https://discuss.elastic.co/t/elasticsearch-7-4-2-returning-pinned-query-not-supported/238629/3 "2020-07-23T10:26:15Z")

</div>

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