Skip to content

Add isEmpty method to BoolQuery #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

floristenhove
Copy link
Contributor

This PR introduces a new isEmpty method in the BoolQuery class and adds tests. This is a convenience method that eases development when working with this package. In my experience, building a bool query can get quite complicated and sometimes ends up without any queries. This method provides an easy way to check this.

I've also added a test for the entire class, which did not exist yet.

Enhancements to BoolQuery functionality:

  • Added the isEmpty method to the BoolQuery class to check whether the query is empty by verifying that all query components (must, filter, should, and must_not) are empty.

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

Successfully merging this pull request may close these issues.

1 participant