Repository navigation
[JAY-796] Fix QueryBuilder#merge docs and tests - #85
Open
sergio-bobillier wants to merge 1 commit into
Open
sergio-bobillier wants to merge 1 commit into
sergio-bobillier wants to merge 1 commit into
Conversation
sergio-bobillier
force-pushed
the
sb-JAY-796-fix-query-merge-doc
branch
from
October 27, 2026 11:59
43dbe08 to
cb84db3
Compare
The documentation for this method was wrong, it claimed that, when two QueryBuilders are merged their query clauses are put together with a boolean 'must' clause, however, this is only true when either of the clauses is not a boolean clause. When both clauses are boolean clauses, the result is a compound boolean clause in which equivalent boolean subclauses are merged into a single one. This commit fixes the issue and expands the documentation to properly describe the correct behavior of the merge operation. An unnecessary #allow for a call to #must is also being removed from the method's tests. Both the documentation and the stray #allow are leftovers from a previous implementation.
sergio-bobillier
force-pushed
the
sb-JAY-796-fix-query-merge-doc
branch
from
October 27, 2026 15:21
cb84db3 to
6fe3017
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The documentation for this method was wrong, it claimed that, when two
QueryBuilders are merged their query clauses are put together with a booleanmustclause, however, this is only true when either of the clauses is not a boolean clause.When both clauses are boolean clauses, the result is a compound boolean clause in which equivalent boolean subclauses are merged into a single one.
This commit fixes the issue and expands the documentation to properly describe the correct behavior of the merge operation.
An unnecessary #allow for a call to #must is also being removed from the method's tests.
Both the documentation and the stray #allow are leftovers from a previous implementation.