chibulcuteanu opened a new pull request, #3265: URL: https://github.com/apache/jackrabbit-oak/pull/3265
Jira: https://issues.apache.org/jira/browse/OAK-12509 ### Problem An index can be selected by name with hyphens (e.g. `option(index name [damAssetLucene-12-custom-1])`), but a tag such as `semantic-pages` configured in the index `tags` property cannot be used with `option(index tag ...)`: the parser only accepted `a-z, A-Z, 0-9, _` for tag values. This affects both SQL-2 and XPath (XPath is converted to SQL-2 internally). ### Change - `SQL2Parser.readLabel()`: also accept `-` in index tag values. Other characters (e.g. `.`) are still rejected; length limit unchanged. - Docs (`query-engine.md`) updated. ### Tests - `OptionIndexTagTests#optionIndexTagWithHyphen`: index with tag `semantic-pages` is selected via SQL-2 (`[semantic-pages]`, `"semantic-pages"`) and XPath (`option(index tag semantic-pages)`); a non-matching hyphenated tag falls back to traversal. - `xpath.txt`: `[a-b]` (previously expected to fail, OAK-937) is now accepted; added XPath→SQL-2 conversion case for a hyphenated tag; `[a.b]` still rejected with the updated message. `mvn test -pl oak-core -Dtest=OptionIndexTagTests,PropertyIndexQueryTest,SQL2ParserTest` passes. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
