Skip to content

Conversation

afoucret
Copy link
Contributor

@afoucret afoucret commented Sep 8, 2025

The KqlParserBooleanQueryTests were failing because the random query generator could pick boolean operators (AND, OR, NOT) as query terms. This would result in queries like "mapped_string":"AND AND NOT", which the parser would interpret as a MatchQueryBuilder instead of the expected BoolQueryBuilder, causing assertion failures.

Fixes #133863
Fixes #133871

The KqlParserBooleanQueryTests were failing because the random query generator could pick boolean operators (AND, OR, NOT) as query terms. This would result in queries like "mapped_string":"AND AND NOT", which the parser would interpret as a MatchQueryBuilder instead of the expected BoolQueryBuilder, causing assertion failures.

 Fixes elastic#133863, elastic#133871
@afoucret afoucret added >test-failure Triaged test failures from CI :Search Relevance/Search Catch all for Search Relevance v9.2.0 labels Sep 8, 2025
@elasticsearchmachine elasticsearchmachine added needs:risk Requires assignment of a risk label (low, medium, blocker) Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch labels Sep 8, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@afoucret afoucret requested review from a team, carlosdelest and ioanatia September 9, 2025 06:05
Copy link
Member

@carlosdelest carlosdelest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, including the ⚽ 🏆 test

@afoucret afoucret merged commit 4ec28fd into elastic:main Sep 9, 2025
34 checks passed
@afoucret afoucret added v9.1.0 v9.1.4 v9.0.7 auto-backport Automatically create backport pull requests when merged v8.19.4 and removed v9.1.0 labels Sep 9, 2025
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Sep 9, 2025
…lastic#134328)

* KQL Prevent boolean operators from being used as literals in tests

The KqlParserBooleanQueryTests were failing because the random query generator could pick boolean operators (AND, OR, NOT) as query terms. This would result in queries like "mapped_string":"AND AND NOT", which the parser would interpret as a MatchQueryBuilder instead of the expected BoolQueryBuilder, causing assertion failures.

 Fixes elastic#133863, elastic#133871

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Kubik42 pushed a commit to Kubik42/elasticsearch that referenced this pull request Sep 9, 2025
…lastic#134328)

* KQL Prevent boolean operators from being used as literals in tests

The KqlParserBooleanQueryTests were failing because the random query generator could pick boolean operators (AND, OR, NOT) as query terms. This would result in queries like "mapped_string":"AND AND NOT", which the parser would interpret as a MatchQueryBuilder instead of the expected BoolQueryBuilder, causing assertion failures.

 Fixes elastic#133863, elastic#133871

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
afoucret added a commit to afoucret/elasticsearch that referenced this pull request Sep 11, 2025
…lastic#134328)

* KQL Prevent boolean operators from being used as literals in tests

The KqlParserBooleanQueryTests were failing because the random query generator could pick boolean operators (AND, OR, NOT) as query terms. This would result in queries like "mapped_string":"AND AND NOT", which the parser would interpret as a MatchQueryBuilder instead of the expected BoolQueryBuilder, causing assertion failures.

 Fixes elastic#133863, elastic#133871

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
(cherry picked from commit 4ec28fd)
afoucret added a commit to afoucret/elasticsearch that referenced this pull request Sep 11, 2025
…lastic#134328)

* KQL Prevent boolean operators from being used as literals in tests

The KqlParserBooleanQueryTests were failing because the random query generator could pick boolean operators (AND, OR, NOT) as query terms. This would result in queries like "mapped_string":"AND AND NOT", which the parser would interpret as a MatchQueryBuilder instead of the expected BoolQueryBuilder, causing assertion failures.

 Fixes elastic#133863, elastic#133871

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
(cherry picked from commit 4ec28fd)
@afoucret
Copy link
Contributor Author

💔 Some backports could not be created

Status Branch Result
9.1
9.0
8.19 Conflict resolution was aborted by the user
8.18 An unhandled error occurred. Please see the logs for details

Manual backport

To create the backport manually run:

backport --pr 134328

Questions ?

Please refer to the Backport tool documentation

elasticsearchmachine pushed a commit that referenced this pull request Sep 11, 2025
…134328) (#134526)

* KQL Prevent boolean operators from being used as literals in tests

The KqlParserBooleanQueryTests were failing because the random query generator could pick boolean operators (AND, OR, NOT) as query terms. This would result in queries like "mapped_string":"AND AND NOT", which the parser would interpret as a MatchQueryBuilder instead of the expected BoolQueryBuilder, causing assertion failures.

 Fixes #133863, #133871

* [CI] Auto commit changes from spotless

---------


(cherry picked from commit 4ec28fd)

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
elasticsearchmachine pushed a commit that referenced this pull request Sep 11, 2025
…tests (#134328) (#134522)

* KQL  - Prevent boolean operators from being used as literals in tests (#134328)

* KQL Prevent boolean operators from being used as literals in tests

The KqlParserBooleanQueryTests were failing because the random query generator could pick boolean operators (AND, OR, NOT) as query terms. This would result in queries like "mapped_string":"AND AND NOT", which the parser would interpret as a MatchQueryBuilder instead of the expected BoolQueryBuilder, causing assertion failures.

 Fixes #133863, #133871

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
(cherry picked from commit 4ec28fd)

* Update muted-tests.yml

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged needs:risk Requires assignment of a risk label (low, medium, blocker) :Search Relevance/Search Catch all for Search Relevance Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch >test-failure Triaged test failures from CI v8.19.4 v9.0.7 v9.1.4 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] KqlParserBooleanQueryTests testParseAndQuery failing [CI] KqlParserBooleanQueryTests testParseOrQuery failing

3 participants