| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Bloodhound.ElasticSearch7.Client
Synopsis
- module Database.Bloodhound.Common.Client
- pitSearch :: (FromJSON a, MonadBH m, WithBackend 'ElasticSearch7 m) => IndexName -> Search -> m [Hit a]
- openPointInTime :: (MonadBH m, WithBackend 'ElasticSearch7 m) => IndexName -> m (ParsedEsResponse OpenPointInTimeResponse)
- closePointInTime :: (MonadBH m, WithBackend 'ElasticSearch7 m) => ClosePointInTime -> m (ParsedEsResponse ClosePointInTimeResponse)
Documentation
pitSearch :: (FromJSON a, MonadBH m, WithBackend 'ElasticSearch7 m) => IndexName -> Search -> m [Hit a] Source #
pitSearch uses the point in time (PIT) API of elastic, for a given
IndexName. Requires Elasticsearch >=7.10. Note that this will consume the
entire search result set and will be doing O(n) list appends so this may
not be suitable for large result sets. In that case, the point in time API
should be used directly with openPointInTime and closePointInTime.
Note that pitSearch utilizes the search_after parameter under the hood,
which requires a non-empty sortBody field in the provided Search value.
Otherwise, pitSearch will fail to return all matching documents.
For more information see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html.
openPointInTime :: (MonadBH m, WithBackend 'ElasticSearch7 m) => IndexName -> m (ParsedEsResponse OpenPointInTimeResponse) Source #
openPointInTime opens a point in time for an index given an IndexName.
Note that the point in time should be closed with closePointInTime as soon
as it is no longer needed.
For more information see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html.
closePointInTime :: (MonadBH m, WithBackend 'ElasticSearch7 m) => ClosePointInTime -> m (ParsedEsResponse ClosePointInTimeResponse) Source #
closePointInTime closes a point in time given a ClosePointInTime.
For more information see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html.