OpenSearch/docs/reference
Nhat Nguyen 3d69b5c41e Introduce point in time APIs in x-pack basic (#61062)
This commit introduces a new API that manages point-in-times in x-pack
basic. Elasticsearch pit (point in time) is a lightweight view into the
state of the data as it existed when initiated. A search request by
default executes against the most recent point in time. In some cases,
it is 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 before being used in search requests. The
`keep_alive` parameter tells Elasticsearch how long it should keep a
point in time around.

```
POST /my_index/_pit?keep_alive=1m
```

The response from the above request includes a `id`, which should be
passed to the `id` of the `pit` parameter of search requests.

```
POST /_search
{
    "query": {
        "match" : {
            "title" : "elasticsearch"
        }
    },
    "pit": {
            "id":  "46ToAwMDaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQNpZHkFdXVpZDIrBm5vZGVfMwAAAAAAAAAAKgFjA2lkeQV1dWlkMioGbm9kZV8yAAAAAAAAAAAMAWICBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
            "keep_alive": "1m"
    }
}
```

Point-in-times are automatically closed when the `keep_alive` is
elapsed. However, keeping point-in-times has a cost; hence,
point-in-times should be closed as soon as they are no longer used in
search requests.

```
DELETE /_pit
{
    "id" : "46ToAwMDaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQNpZHkFdXVpZDIrBm5vZGVfMwAAAAAAAAAAKgFjA2lkeQV1dWlkMioGbm9kZV8yAAAAAAAAAAAMAWIBBXV1aWQyAAA="
}
```

#### Notable works in this change:

- Move the search state to the coordinating node: #52741
- Allow searches with a specific reader context: #53989
- Add the ability to acquire readers in IndexShard: #54966

Relates #46523
Relates #26472

Co-authored-by: Jim Ferenczi <jimczi@apache.org>
2020-09-10 19:25:47 -04:00
..
aggregations [7.x] Add rate aggregation (#61369) (#61554) 2020-08-25 17:39:00 -04:00
analysis [DOCS] Replace Wikipedia links with attribute (#61171) (#61209) 2020-08-17 11:27:04 -04:00
autoscaling Autoscaling decider and decision service (#59005) (#60884) 2020-08-10 15:28:52 +02:00
cat Document new stats in _cat/nodes (#60445) (#61742) 2020-08-31 12:40:21 -05:00
ccr [DOCS] Fix typo in CCR Put Follow API docs (#61392) (#61470) 2020-08-24 09:46:23 -04:00
cluster [DOCS] Fix typo in nodes stats docs (#61601) (#61717) 2020-08-31 09:29:50 -04:00
commands [DOCS] Replace Wikipedia links with attribute (#61171) (#61209) 2020-08-17 11:27:04 -04:00
data-streams [DOCS] Add 7.9 breaking change for built-in templates (#61549) (#61558) 2020-08-26 08:10:59 -04:00
docs [DOCS] Use correct get document API (#61804) (#61992) 2020-09-04 10:04:33 -04:00
eql [DOCS] Remove collapsible examples in EQL syntax docs (#62220) (#62226) 2020-09-10 10:55:00 -04:00
graph [DOCS] Document `xpack.graph.enabled` setting (#60073) (#61433) 2020-08-21 15:13:13 -04:00
high-availability [DOCS] Replace Wikipedia links with attribute (#61171) (#61209) 2020-08-17 11:27:04 -04:00
how-to remove xref from heading 2020-09-03 17:49:36 -04:00
ilm [DOCS] Fix ILM force merge codec param (#62243) (#62251) 2020-09-10 14:08:04 -04:00
images [DOCS] Update example data stream names (#60783) (#60820) 2020-08-06 09:38:35 -04:00
index-modules [DOCS] Fix ILM read only link (#62113) (#62119) 2020-09-08 12:19:24 -04:00
indices [DOCS] Split delete index template API docs (#62074) (#62169) 2020-09-09 10:13:16 -04:00
ingest [DOCS] Fix Gsub processor snippet (#61720) (#61723) 2020-08-31 10:43:26 -04:00
licensing [DOCS] Swap `[float]` for `[discrete]` (#60134) 2020-07-23 12:42:33 -04:00
mapping [DOCS] Fix keyword xref 2020-09-02 11:47:17 -04:00
migration Small fixes to breaking changes docs. 2020-09-08 17:19:36 -07:00
ml [ML] Include the "properties" layer in find_file_structure mappings (#62158) 2020-09-10 09:33:42 +01:00
modules [DOCS] Document dynamic discovery settings (#61420) (#62002) 2020-09-04 11:36:34 -04:00
monitoring [DOCS] Clarify enabling monitoring features (#61758) 2020-08-31 13:16:23 -07:00
query-dsl [DOCS] Fix range query admon for clarity (#62163) (#62171) 2020-09-09 10:37:43 -04:00
release-notes [DOCS] Remove #60900 from release notes (#61944) 2020-09-03 10:57:00 -07:00
repositories-metering-api Add repositories metering API (#62088) 2020-09-08 14:01:04 +02:00
rest-api Remove REST APIs documentation for experimental Searchable Snapshot APIs (#62217) (#62231) 2020-09-10 16:51:28 +02:00
rollup [DOCS] Swap `[float]` for `[discrete]` (#60134) 2020-07-23 12:42:33 -04:00
scripting [DOCS] Fix ingest script compilation rate and cache size (#61468) (#61479) 2020-08-24 10:46:44 -04:00
search Introduce point in time APIs in x-pack basic (#61062) 2020-09-10 19:25:47 -04:00
searchable-snapshots/apis Remove REST APIs documentation for experimental Searchable Snapshot APIs (#62217) (#62231) 2020-09-10 16:51:28 +02:00
settings [DOCS] Document dynamic cluster settings (#61760) (#61817) 2020-09-01 16:04:23 -04:00
setup [DOCS] Note the cluster settings API can override `elasticsearch.yml` (#61394) (#61464) 2020-08-24 09:32:26 -04:00
slm [DOCS] Swap `[float]` for `[discrete]` (#60134) 2020-07-23 12:42:33 -04:00
snapshot-restore Remove Outdated Snapshot Docs (#61684) (#61728) 2020-08-31 12:04:27 -04:00
sql [DOCS] Combine keyword family docs (#61662) (#61813) 2020-09-01 15:32:56 -04:00
transform [7.x] [DOCS] Adds filter aggregation example link to painless examples (#61890) (#61902) 2020-09-03 15:32:30 +02:00
upgrade [DOCS] Note remote reindex is not fwd compatible (#60425) (#60454) 2020-07-30 09:23:55 -04:00
vectors [DOCS] Update my-index examples (#60132) (#60248) 2020-07-27 15:58:26 -04:00
aggregations.asciidoc [DOCS] Swap `[float]` for `[discrete]` (#60134) 2020-07-23 12:42:33 -04:00
analysis.asciidoc [DOCS] Swap `[float]` for `[discrete]` (#60134) 2020-07-23 12:42:33 -04:00
api-conventions.asciidoc [7.x] [DOCS] Update multi-target syntax page (#62192) (#62195) 2020-09-09 18:24:33 -04:00
cat.asciidoc AwaitsFix for #51619 2020-08-06 09:48:35 +01:00
cluster.asciidoc Password-protected Keystore Feature Branch PR (#51123) (#51510) 2020-01-28 05:32:32 -05:00
data-rollup-transform.asciidoc [DOCS] Changes level offset of transform pages (#60066) (#60075) 2020-07-22 11:22:57 -07:00
docs.asciidoc [DOCS] Remove heading offsets for REST APIs (#44568) 2019-07-19 14:36:06 -04:00
frozen-indices.asciidoc [DOCS] Replace `twitter` dataset in docs (#60604) (#60609) 2020-08-03 13:31:19 -04:00
getting-started.asciidoc [DOCS] Swap `[float]` for `[discrete]` (#60134) 2020-07-23 12:42:33 -04:00
glossary.asciidoc [DOCS] Fix hyphenation for "time series" (#61472) (#61481) 2020-08-24 11:18:07 -04:00
gs-index.asciidoc [DOCS] Adding index file for GS "mini book". 2017-07-18 13:44:08 -07:00
high-availability.asciidoc [DOCS] Add docs for designing resilient clusters (#47233) (#57743) 2020-06-05 12:08:45 -04:00
how-to.asciidoc [DOCS] Add 'how to' doc about avoiding oversharding (#55480) 2020-04-22 10:44:16 -04:00
index-modules.asciidoc [7.x] [DOCS] Update CCR docs to focus on Kibana. (#61237) 2020-08-17 16:58:13 -04:00
index.asciidoc [DOCS] Combine `Search your data` files (#61477) (#61486) 2020-08-24 13:08:00 -04:00
index.x.asciidoc [DOCS] Removes redundant index.asciidoc files (#30707) 2018-05-18 11:05:40 -07:00
indices.asciidoc [DOCS] Split delete index template API docs (#62074) (#62169) 2020-09-09 10:13:16 -04:00
ingest.asciidoc [DOCS] Update my-index examples (#60132) (#60248) 2020-07-27 15:58:26 -04:00
intro.asciidoc [DOCS] Fix hyphenation for "time series" (#61472) (#61481) 2020-08-24 11:18:07 -04:00
links.asciidoc [DOCS] Fix security links in machine learning APIs (#60098) (#60152) 2020-07-23 16:43:10 -07:00
mapping.asciidoc Remove a redundant section on field data types. (#61821) 2020-09-02 15:29:48 -07:00
query-dsl.asciidoc [DOCS] Combine keyword family docs (#61662) (#61813) 2020-09-01 15:32:56 -04:00
redirects.asciidoc [DOCS] Add redirects for removed searchable snapshot APIs (#62236) (#62237) 2020-09-10 11:40:24 -04:00
release-notes.asciidoc [DOCS] Add jump link for 7.9.1 release notes (#61960) 2020-09-04 08:56:52 -04:00
scripting.asciidoc [DOCS] Swap `[float]` for `[discrete]` (#60134) 2020-07-23 12:42:33 -04:00
search.asciidoc [DOCS] Prune `Search your data` content (#61303) (#61462) 2020-08-24 09:31:53 -04:00
setup.asciidoc [DOCS] http -> https, remove outdated plugin docs (#60380) (#60545) 2020-07-31 16:16:31 -04:00
upgrade.asciidoc [7.x] [DOCS] Update upgrade docs and release highlights for 7.9 (#59674) 2020-07-16 15:58:40 -04:00