bloodhound-0.24.0.0: Elasticsearch client library for Haskell
Safe HaskellNone
LanguageHaskell2010

Database.Bloodhound.OpenSearch2.Client

Synopsis

Documentation

pitSearch :: (FromJSON a, MonadBH m, WithBackend 'OpenSearch2 m) => IndexName -> Search -> m [Hit a] Source #

pitSearch uses the point in time (PIT) API of elastic, for a given IndexName. 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://opensearch.org/docs/latest/search-plugins/point-in-time/.

openPointInTime :: (MonadBH m, WithBackend 'OpenSearch2 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://opensearch.org/docs/latest/search-plugins/point-in-time/.