Point In Time Usage

edit

A search request by default executes 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.

Point in time search requests should not specify an index path parameter. When including a point in time in a search request, it will cause the URL path of the request to become the rooted /_search path instead of /{index}/_search.

See the Elasticsearch documentation on point in time API for more detail.

Fluent DSL example

edit
s => s
.PointInTime("a-point-in-time-id", p => p
.KeepAlive("1m"))

Object Initializer syntax example

edit
new SearchRequest<Project>
{
    PointInTime = new Nest.PointInTime("a-point-in-time-id", "1m")
}

Example json output.

{
  "pit": {
    "id": "a-point-in-time-id",
    "keep_alive": "1m"
  }
}