400: request does not support [pit]

Hi: I am executing the following query against the search api, but it is returning a 400, and an error that the request does not support the pit parameter.

This is from the Go client, however, from the python client the request goes through.

{
  "pit": {
    "id": "PIT here, looks totally valid",
    "keep_alive": "10m"
  },
  "size": 2,
  "query": {
    "match_all": {}
  },
  "sort": [
    {"_shard_doc": "asc"}
  ]
}

Any help is appreciated, thanks.

Welcome to our community! :smiley:

It'd be useful if you could share the code that this request is being executed in, as someone may be able to provide further assistance based on it.

Hi, I have solved the problem, it was actually a different request than I thought, and simply caused by a difference between the python and go client (the python client removes invalid entries from the request body, the go client does not).

Thanks

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