Package-level declarations
Types
Use this co routine scope to control affinity to a particular host. Ktor client may attempt to pipeline/reuse connections depending on how you set that up.
DSL for configuring the update aliases request. The request is a list of actions (add, remove, remove_index). Each action is configured with an AliasAction that specifies the affected indices, aliases, etc.
Use this to deal with item responses and failures; or bulk request errors. By default, the callback is null.
Ktor-client implementation of the RestClient.
Minimalistic abstraction that should allow for different clients.
Search client that you can use to talk to Elasticsearch or Opensearch.
If you are running against a cluster without a node balancer you can use this node selector to make the client sniff nodes from the cluster.
Search engine variant meta data.
Properties
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.
Returns the aliases for a target.
Returns the set of alias names for an index or an empty set.
Returns the set of indices that have the alias. If you call this on an index, the returned set will just contain the index.
If include_named_queries_score parameter is not true
only ES returns only query names for each Hit. If include_named_queries_score is true
please use the scoreByName
function.
Version of parseHits that reuses the ModelSerializationStrategy
.
Quick way to get the document hits from a SearchResponse. You can override the default json if you need to.
Non reified version of parseHits that takes a deserializationStrategy.
Reindex and waits for completion. Returns a reindex response indicating what was reindexed.
Reindexes using a background task in ES and polls for that task to complete every pollInterval for a maximum of timeout. Note: the same timeout is passed on to the reindex task
Reindexes using a background task in ES. Returns a TaskId response with an id that you can use with the task api.
Http GET to /
The request parameter named include_named_queries_score controls whether scores associated with the matched queries are returned or not. When set, the response includes a matched_queries map that contains the name of the query that matched as a key and its associated score as the value.
Scroll through search results for a scrolling search.
Perform a deep paging search using point in time and search after.
On JVM this will return the current thread name, on kotlin-js this will return null
On JVM this will return the current thread name, otherwise this will return null and pick a random node
On JVM this will return the current thread name, otherwise this will return null and pick a random node
On JVM this will return the current thread name, otherwise this will return null and pick a random node
On JVM this will return the current thread name, otherwise this will return null and pick a random node
Atomically process alias updates with a DSL.