From c4f3765fee0d6a24814ad5e96e7ccad6071b6b23 Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Wed, 16 Nov 2022 16:52:54 -0500 Subject: [PATCH] Added point in time to pagination (#1951) Signed-off-by: Fanit Kolchina Signed-off-by: Fanit Kolchina --- _opensearch/search/autocomplete.md | 2 +- _opensearch/search/paginate.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/_opensearch/search/autocomplete.md b/_opensearch/search/autocomplete.md index eac088fb..74b680c1 100644 --- a/_opensearch/search/autocomplete.md +++ b/_opensearch/search/autocomplete.md @@ -42,7 +42,7 @@ GET shakespeare/_search } ``` -To make the word order and relative positions flexible, specify a `slop` value. To learn about the `slop` option, see [Other optional query fields]({{site.url}}{{site.baseurl}}/opensearch/query-dsl/full-text#other-optional-query-fields). +To make the word order and relative positions flexible, specify a `slop` value. To learn about the `slop` option, see [Other advanced options]({{site.url}}{{site.baseurl}}/opensearch/query-dsl/full-text#other-advanced-options). Prefix matching doesn’t require any special mappings. It works with your data as is. However, it’s a fairly resource-intensive operation. A prefix of `a` could match hundreds of thousands of terms and not be useful to your user. diff --git a/_opensearch/search/paginate.md b/_opensearch/search/paginate.md index e319b0b1..660a99f2 100644 --- a/_opensearch/search/paginate.md +++ b/_opensearch/search/paginate.md @@ -12,6 +12,7 @@ You can use the following methods to paginate search results in OpenSearch: 1. The [`from` and `size` parameters](#the-from-and-size-parameters) 1. The [scroll search](#scroll-search) operation 1. The [`search_after` parameter](#the-search_after-parameter) +1. [Point in Time with `search_after`](#point-in-time-with-search_after) ## The `from` and `size` parameters @@ -272,3 +273,7 @@ GET shakespeare/_search ``` Unlike the `scroll` operation, the `search_after` parameter is stateless, so the document order may change because of documents being indexed or deleted. + +## Point in Time with `search_after` + +Point in Time (PIT) with `search_after` is the preferred pagination method in OpenSearch, especially for deep pagination. It bypasses the limitations of all other methods because it operates on a dataset that is frozen in time, it is not bound to a query, and it supports consistent pagination going forward and backward. To learn more, see [Point in Time]({{site.url}}{{site.baseurl}}/opensearch/point-in-time). \ No newline at end of file