Uh oh!
There was an error while loading. Please reload this page.
[fix](search) Fix slash character in search query_string terms - #61599
Merged
Conversation
Thearas
commented
Mar 22, 2026
Contributor
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
airborne12
commented
Mar 22, 2026
MemberAuthor
run buildall |
The ANTLR lexer excluded '/' from TERM_CHAR, causing terms like 'AC/DC' to be incorrectly tokenized — the slash was silently skipped, splitting it into two separate terms. Add '/' to TERM_CHAR so it can appear within terms while regex patterns (/pattern/) still work since '/' remains excluded from TERM_START_CHAR.
airborne12force-pushed
the
fix-search-slash-in-term
branch
from
March 22, 2026 14:08
1e7f9c4 to
67a7155Compareairborne12
commented
Mar 22, 2026
MemberAuthor
run buildall |
doris-robot
commented
Mar 22, 2026
TPC-H: Total hot run time: 26636 ms |
doris-robot
commented
Mar 22, 2026
TPC-DS: Total hot run time: 168909 ms |
### What problem does this PR solve? Problem Summary: The regression test `test_search_slash_in_term` was missing its expected output file (.out), causing P0 Regression and Cloud P0 pipelines to fail with `Missing outputFile` error. ### Release note None ### Check List (For Author) - Test: Regression test - Behavior changed: No - Does this need documentation: No
airborne12
commented
Mar 23, 2026
MemberAuthor
run buildall |
doris-robot
commented
Mar 23, 2026
TPC-H: Total hot run time: 26771 ms |
doris-robot
commented
Mar 23, 2026
TPC-DS: Total hot run time: 168699 ms |
RoanHeNaN
approved these changes
Mar 23, 2026
Contributor
PR approved by anyone and no changes requested. |
Contributor
PR approved by at least one committer and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
github-actionsBot
pushed a commit
that referenced
this pull request
Mar 23, 2026
### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: The ANTLR lexer in the search() DSL parser excluded `/` from `TERM_CHAR`, causing terms like `AC/DC` to be incorrectly tokenized. The slash was silently skipped by ANTLR's default error recovery, splitting `AC/DC` into two separate terms `AC` and `DC` instead of treating it as a single term. This caused inconsistent behavior compared to Elasticsearch's query_string parsing, where `AC\/DC` (escaped slash) is handled as a single analyzed term. **Fix**: Add `/` to the `TERM_CHAR` fragment in `SearchLexer.g4`. This allows `/` to appear within terms (e.g., `AC/DC` -> single term) while regex patterns like `/[a-z]+/` still work correctly since `/` remains excluded from `TERM_START_CHAR`.
github-actionsBot
pushed a commit
that referenced
this pull request
Mar 23, 2026
### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: The ANTLR lexer in the search() DSL parser excluded `/` from `TERM_CHAR`, causing terms like `AC/DC` to be incorrectly tokenized. The slash was silently skipped by ANTLR's default error recovery, splitting `AC/DC` into two separate terms `AC` and `DC` instead of treating it as a single term. This caused inconsistent behavior compared to Elasticsearch's query_string parsing, where `AC\/DC` (escaped slash) is handled as a single analyzed term. **Fix**: Add `/` to the `TERM_CHAR` fragment in `SearchLexer.g4`. This allows `/` to appear within terms (e.g., `AC/DC` -> single term) while regex patterns like `/[a-z]+/` still work correctly since `/` remains excluded from `TERM_START_CHAR`.
yiguolei pushed a commit
that referenced
this pull request
Mar 24, 2026
### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: The ANTLR lexer in the search() DSL parser excluded `/` from `TERM_CHAR`, causing terms like `AC/DC` to be incorrectly tokenized. The slash was silently skipped by ANTLR's default error recovery, splitting `AC/DC` into two separate terms `AC` and `DC` instead of treating it as a single term. This caused inconsistent behavior compared to Elasticsearch's query_string parsing, where `AC\/DC` (escaped slash) is handled as a single analyzed term. **Fix**: Add `/` to the `TERM_CHAR` fragment in `SearchLexer.g4`. This allows `/` to appear within terms (e.g., `AC/DC` -> single term) while regex patterns like `/[a-z]+/` still work correctly since `/` remains excluded from `TERM_START_CHAR`.
Closed
HappenLee pushed a commit
to HappenLee/incubator-doris
that referenced
this pull request
Mar 31, 2026
…e#61599) ### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: The ANTLR lexer in the search() DSL parser excluded `/` from `TERM_CHAR`, causing terms like `AC/DC` to be incorrectly tokenized. The slash was silently skipped by ANTLR's default error recovery, splitting `AC/DC` into two separate terms `AC` and `DC` instead of treating it as a single term. This caused inconsistent behavior compared to Elasticsearch's query_string parsing, where `AC\/DC` (escaped slash) is handled as a single analyzed term. **Fix**: Add `/` to the `TERM_CHAR` fragment in `SearchLexer.g4`. This allows `/` to appear within terms (e.g., `AC/DC` -> single term) while regex patterns like `/[a-z]+/` still work correctly since `/` remains excluded from `TERM_START_CHAR`.
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 freeto 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.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
The ANTLR lexer in the search() DSL parser excluded
/fromTERM_CHAR, causing terms likeAC/DCto be incorrectly tokenized. The slash was silently skipped by ANTLR's default error recovery, splittingAC/DCinto two separate termsACandDCinstead of treating it as a single term.This caused inconsistent behavior compared to Elasticsearch's query_string parsing, where
AC\/DC(escaped slash) is handled as a single analyzed term.Fix: Add
/to theTERM_CHARfragment inSearchLexer.g4. This allows/to appear within terms (e.g.,AC/DC-> single term) while regex patterns like/[a-z]+/still work correctly since/remains excluded fromTERM_START_CHAR.Release note
Fix search() function incorrectly handling slash (/) character within query terms (e.g.,
AC/DC). The slash is now treated as a regular character within terms instead of being silently dropped.Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)