SumoLogic/elasticsearch-client

support Exists query

Opened this issue · 1 comments

yunj commented

Does the current client support exists query? There was an old PR for adding support to Exists query, but it's been closed without merging.

Please advise. Thanks.

Hi @yunj,

the current client exposes only documentExistsById(index: Index, tpe: Type, id: String) function.

If you are interested in exists based on query, we don't have such method implemented. What I'm suggesting is to use count(index: Index, tpe: Type, query: QueryRoot) with terminateAfterOpt set to Some(1) and then exists = count > 0