c51cfbb6d0
Currently parsing inner queries can return `null` which leads to unnecessary complicated null checks further up the query hierarchy. By introducing a special EmptyQueryBuilder that can be used to signal that this query clause should be ignored upstream where possible, we can avoid additional null checks in parent query builders and still allow for this query to be ignored when creating the lucene query later. This new builder returns `null` when calling its `toQuery()` method, so at this point we still need to handle it, but having an explicit object for the intermediate query representation makes it easier to differentiate between cases where inner query clauses are empty (legal) or are not set at all (illegal). Also added check for empty inner builder list to BoolQueryBuilder and OrQueryBuilder. Removed setters for positive/negatice query in favour of constructor with mandatory non-null arguments in BoostingQueryBuilder. Closes #11915 |
||
---|---|---|
.. | ||
index.asciidoc | ||
migrate_1_0.asciidoc | ||
migrate_1_4.asciidoc | ||
migrate_1_6.asciidoc | ||
migrate_2_0.asciidoc | ||
migrate_query_refactoring.asciidoc |