Search Client
Search client that you can use to talk to Elasticsearch or Opensearch.
Most client api functions are implemented as extension functions.
Parameters
rest client configured to talk to your search engine. Defaults to KtorRestClient configured to talk to localhost:9200.
kotlinx.serialization Json used to deserialize responses. Defaults to DEFAULT_JSON which is configured with some sane defaults.
Functions
Send a single bulk request. Consider using the variant that creates a BulkSession.
Creates a bulk session that allows you to index, create, or delete items via the convenient kotlin DSL.
Variant of the _count api that allows you to pass in an ESQuery object. It will be set as the query on the json body that is sent to _count.
Variant of the _count api that takes a search dsl block so you can set the query. Note, not all parts of the search dsl are supported by _count. E.g. adding sorting would be an error.
Variant of the _count api that takes an optional rawBody. Leaving the body empty means doing a match_all search.
Create a point in time for use with e.g. search_after.
Delete a scroll by id.
Cheap way to access the version information returned by root
Http GET to /
Scroll through search results for a scrolling search.
Perform a deep paging search using point in time and search after.