Multi platform kotlin client for Elasticsearch & Opensearch with easily extendable Kotlin DSLs for queries, mappings, bulk, and more.
KT Search Manual | Previous: Highlighting | Next: Document Manipulation |
Github | © Jilles van Gurp |
Delete by query is supported both on the client and the repository.
val repo = client.repository(indexName, TestDoc.serializer())
repo.bulk(refresh = Refresh.WaitFor) {
create(TestDoc("1", "banana", price = 2.0))
create(TestDoc("1", "apple", price = 1.0))
}
repo.deleteByQuery {
query = match(TestDoc::name, "apple")
}.deleted
If you need the optional query parameters on this API, use client.deleteByQuery
instead.
KT Search Manual | Previous: Highlighting | Next: Document Manipulation |
Github | © Jilles van Gurp |