Open a point in time Added in 7.10.0
A search request by default runs against the most recent visible data of the target indices,
which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the
state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple
search requests using the same point in time. For example, if refreshes happen between
search_after
requests, then the results of those requests might not be consistent as changes happening
between searches are only visible to the more recent point in time.
A point in time must be opened explicitly before being used in search requests.
The keep_alive
parameter tells Elasticsearch how long it should persist.
Path parameters
-
A comma-separated list of index names to open point in time; use
_all
or empty string to perform the operation on all indices
Query parameters
-
Extends the time to live of the corresponding point in time.
-
preference string
Specifies the node or shard the operation should be performed on. Random by default.
-
routing string
Custom value used to route operations to a specific shard.
-
expand_wildcards string | array[string]
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as
open,hidden
. Valid values are:all
,open
,closed
,hidden
,none
. -
allow_partial_search_results boolean
If
false
, creating a point in time request when a shard is missing or unavailable will throw an exception. Iftrue
, the point in time will contain all the shards that are available at the time of the request.
Body
-
index_filter object
Additional properties are allowed.
curl \
-X POST http://api.example.com/{index}/_pit?keep_alive=string \
-H "Content-Type: application/json" \
-d '{"index_filter":{}}'