Skip to content

Commit

Permalink
Merge pull request #163 from jillesvangurp/add-msearch-to-indexrepo
Browse files Browse the repository at this point in the history
add msearch to index repo
  • Loading branch information
jillesvangurp authored Jan 27, 2025
2 parents 7757cc0 + 9c581dd commit 07929f6
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,37 @@ class IndexRepository<T : Any>(
).parseHits(serializer)
}

suspend fun msearch(
allowNoIndices: Boolean? = null,
cssMinimizeRoundtrips: Boolean? = null,
expandWildcards: ExpandWildCards? = null,
ignoreThrottled: Boolean? = null,
ignoreUnavailable: Boolean? = null,
maxConcurrentSearches: Int? = null,
maxConcurrentShardRequests: Int? = null,
preFilterShardSize: Int? = null,
routing: String? = null,
searchType: SearchType? = null,
typedKeys: Boolean? = null,
block: MsearchRequest.() -> Unit,
): MultiSearchResponse {
return client.msearch(
target = indexReadAlias,
allowNoIndices = allowNoIndices,
cssMinimizeRoundtrips = cssMinimizeRoundtrips,
expandWildcards = expandWildcards,
ignoreThrottled = ignoreThrottled,
ignoreUnavailable = ignoreUnavailable,
maxConcurrentSearches = maxConcurrentSearches,
maxConcurrentShardRequests = maxConcurrentShardRequests,
preFilterShardSize = preFilterShardSize,
routing = routing,
searchType = searchType,
typedKeys = typedKeys,
block = block
)
}

suspend fun deleteByQuery(block: SearchDSL.() -> Unit): DeleteByQueryResponse {
return client.deleteByQuery(target = indexWriteAlias, block = block)
}
Expand Down

0 comments on commit 07929f6

Please sign in to comment.