Elasticsearch 7.4.2 returning pinned-query not supported?

 {
  "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:

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

I get:

{

* "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?

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 and https://www.elastic.co/subscriptions.

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