-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Elasticsearch, Query & PageProvider
-
Release Notes Summary:Parsing of NXQL ES hint supports dash (-) in property name
-
Sprint:nxcore 9.3.5
-
Story Points:2
Parsing this NXQL fails:
SELECT * FROM Document WHERE /*+ES: INDEX(my-schema:article.author) */ my-schema:article/author = 'foo'
org.nuxeo.ecm.core.query.QueryParseException: Lexical Error: Illegal character <-> at offset 44 at org.nuxeo.ecm.core.query.sql.parser.Scanner.scanError(Scanner.java:888) at org.nuxeo.ecm.core.query.sql.parser.Scanner.next_token(Scanner.java:1329) at java_cup.runtime.lr_parser.scan(lr_parser.java:335) at java_cup.runtime.lr_parser.parse(lr_parser.java:563) at org.nuxeo.ecm.core.query.sql.SQLQueryParser.parse(SQLQueryParser.java:43) at org.nuxeo.ecm.core.query.sql.SQLQueryParser.parse(SQLQueryParser.java:52)
The issue is with the hint parser itself, which fails to accept dashes in the syntax for properties in Elasticsearch hints.