Request contains unrecognized parameters for Search API

Hi folks,

In our project, when we are trying to query ES Search API we are getting the below error
{ "error": { "root_cause": [ { "type": "illegal_argument_exception", "reason": "request [/filings_full/_search] contains unrecognized parameters: [batched_reduce_size], [ccs_minimize_roundtrips], [ignore_throttled], [max_concurrent_shard_requests], [typed_keys]" } ], "type": "illegal_argument_exception", "reason": "request [/filings_full/_search] contains unrecognized parameters: [batched_reduce_size], [ccs_minimize_roundtrips], [ignore_throttled], [max_concurrent_shard_requests], [typed_keys]" }, "status": 400 }

Our ES team has recently migrated their ES clusters and this error is popping up in the new clusters. We never encountered this in our old clusters.

Welcome to our community! :smiley:

What is the query that you are sending?

{
    "query": {
        "range": {
            "ingestTime": {
                "from": "2022-12-01T00:00:00.000Z",
                "to": "2022-12-01T23:00:00.000Z",
                "include_lower": true,
                "include_upper": true,
                "boost": 1.0
            }
        }
    },
    "_source": {
        "includes": [
            "filingsPermID",
            "Identifier"
        ],
        "excludes": []
    }
}
}

This is the query but I don't think it is something to do with the query. The cluster is not able to identify the query params I am sending. These query params are mentioned in the official Elasticsearch documentation as well.

What are the parameters you are attaching then?

Which version of Elasticsearch are you using?

Which client are you using? Which version of this are you using?

http://<myelasticsearchURL>/<myindex>/_search?typed_keys=null&max_concurrent_shard_requests=5&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&ignore_throttled=true&scroll=30m&search_type=query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true

I am not sending this URL explicitly. In our project we are using High Level Rest Client to communicate with ES cluster. These query params are sent to the cluster by HLRC itself.

Elastic search version is "5.1.2".
Client version is

<dependency>
            <groupId>org.elasticsearch.client</groupId>
            <artifactId>elasticsearch-rest-high-level-client</artifactId>
            <version>7.9.3</version>
        </dependency>

That version of the client is not compatible with such an old Elasticsearch version. Have a look at this thread for a similar issue.

You need to either upgrade Elasticsearch to version 7.17 or downgrade the client to something compatible.

Also Elasticsearch 5.X is very, very, very old and you need to upgrade as a matter of extreme urgency.

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