Added point in time to pagination (#1951)

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
This commit is contained in:
kolchfa-aws 2022-11-16 16:52:54 -05:00 committed by GitHub
parent 1c6cba6e2b
commit c4f3765fee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -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 doesnt require any special mappings. It works with your data as is. Prefix matching doesnt require any special mappings. It works with your data as is.
However, its a fairly resource-intensive operation. A prefix of `a` could match hundreds of thousands of terms and not be useful to your user. However, its a fairly resource-intensive operation. A prefix of `a` could match hundreds of thousands of terms and not be useful to your user.

View File

@ -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 [`from` and `size` parameters](#the-from-and-size-parameters)
1. The [scroll search](#scroll-search) operation 1. The [scroll search](#scroll-search) operation
1. The [`search_after` parameter](#the-search_after-parameter) 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 ## 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. 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).