Skip to content
This repository was archived by the owner on Oct 18, 2021. It is now read-only.

support Exists query #198

Open
yunj opened this issue Aug 27, 2019 · 1 comment
Open

support Exists query #198

yunj opened this issue Aug 27, 2019 · 1 comment

Comments

@yunj
Copy link

yunj commented Aug 27, 2019

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.

@michaljmatusiak92
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants