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:
parent
1c6cba6e2b
commit
c4f3765fee
|
@ -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.
|
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.
|
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.
|
||||||
|
|
|
@ -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).
|
Loading…
Reference in New Issue