PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, October 24, 2022

[FIXED] How to Create Elasticsearch Point in Time (PIT)?

 October 24, 2022     elastic-stack, elasticsearch     No comments   

Issue

I'm trying to use the search_after parameter with a point in time (PIT) to paginate search results. This is the documentation section I'm consulting.

I'm making a POST to /my-index/_pit?keep_alive=1m.
The /_pit endpoint only accepts the POST method (if I try GET, it says only POST is accepted), and per the doc, does not take a request body. However, the response I receive is a 400 with this message:

"type": "parse_exception",
"reason": "request body is required"

I can't find any other examples of a /_pit request and I'm just confused by these responses.
Has anyone successfully gotten back a PIT?

In case it's relevant, we have a managed elastic cloud deployment on a standard subscription.


Solution

I ended up finding an Elastic forum post indicating that the PIT API is only available as of version 7.10. Sure enough, I tried against a 7.10 deployment and it succeeded as a POST without a body.



Answered By - ChiefMcFrank
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing