You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "soma0212 (via GitHub)" <gi...@apache.org> on 2026/10/16 08:48:47 UTC
[PR] Fix misplaced escape chars in EscapeQuerySyntaxImpl.escapeIgnoringCase [lucene]
soma0212 opened a new pull request, #16853:
URL: https://github.com/apache/lucene/pull/16853
### Description
`EscapeQuerySyntaxImpl.escapeIgnoringCase` (flexible query parser) looks for syntax characters in a lower-cased copy of the term text, then inserts the backslashes at those indexes in the original text. Lower-casing can change the length: U+0130 (capital I with dot above) becomes two chars in every non-Turkic locale, so each syntax character after it is escaped one position too far right, and a syntax character in last position throws `IndexOutOfBoundsException`. For a quoted term this closes the phrase early: `new QuotedFieldQueryNode("body", "İ\" OR secret:\"x", 0, 0).toQueryString(escaper)` gives `body:"İ"\ OR secret:"\x"`, which the parser reads as a phrase plus a separate `secret:` clause, so `toQueryString` output no longer parses back to the original node (the same round trip #7865 fixed for range nodes).
Match and copy from the same string, using `String.regionMatches(true, ...)`, which keeps the case-insensitive contract without changing length. The `Locale` parameter of the private helper is unused after that and is dropped. `TestEscapeQuerySyntaxImpl` covers the escape positions and the parse-back; both tests fail on main. I can add a CHANGES entry under 10.7.0 once this has a PR number.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Fix misplaced escape chars in EscapeQuerySyntaxImpl.escapeIgnoringCase [lucene]
Posted by "github-actions[bot] (via GitHub) via issues" <is...@lucene.apache.org>.
github-actions[bot] commented on PR #16853:
URL: https://github.com/apache/lucene/pull/16853#issuecomment-6995726140
This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Fix misplaced escape chars in EscapeQuerySyntaxImpl.escapeIgnoringCase [lucene]
Posted by "github-actions[bot] (via GitHub) via issues" <is...@lucene.apache.org>.
github-actions[bot] commented on PR #16853:
URL: https://github.com/apache/lucene/pull/16853#issuecomment-6551180418
This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Fix misplaced escape chars in EscapeQuerySyntaxImpl.escapeIgnoringCase [lucene]
Posted by "soma0212 (via GitHub) via issues" <is...@lucene.apache.org>.
soma0212 commented on PR #16853:
URL: https://github.com/apache/lucene/pull/16853#issuecomment-6630282664
gentle ping
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org