Bird
Raised Fist0

Given the following Elasticsearch query using a point-in-time ID, what will be the value of pit_id in the search response?

medium📝 Predict Output Q13 of Q15
Elasticsearch - Advanced Patterns

Given the following Elasticsearch query using a point-in-time ID, what will be the value of pit_id in the search response?

POST /my-index/_search
{
  "pit": {
    "id": "abc123",
    "keep_alive": "2m"
  },
  "query": { "match_all": {} },
  "size": 1
}
AA new PIT ID string
B"2m"
C"abc123"
Dnull
Step-by-Step Solution
Solution:
  1. Step 1: Analyze PIT ID in search response

    Searching with input PIT ID "abc123" and keep_alive "2m" returns a new PIT ID string for paging, not the input ID, "2m", or null.
  2. Final Answer:

    A new PIT ID string -> Option A
  3. Quick Check:

    Search with PIT returns new PIT ID [OK]
Quick Trick: Search with PIT returns updated PIT ID for paging [OK]
Common Mistakes:
MISTAKES
  • Expecting same PIT ID returned
  • Confusing keep_alive value as PIT ID
  • Assuming PIT ID is null in response

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes