You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing errors parsing lucene strings that refer to a date-time value with timezone that is not wrapped with double-quotes. See for example:
>>> from luqum.parser import parser
>>> condition_tree = parser.parse('time:["2023-06-13T04:51:28+00:00" TO now]') # <--- WORKS
>>> condition_tree = parser.parse('time:[2023-06-13T04:51:28+00:00 TO now]') # <-- FAILS
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/var/lang/lib/python3.8/site-packages/ply/yacc.py", line 333, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "/var/lang/lib/python3.8/site-packages/ply/yacc.py", line 1201, in parseopt_notrack
tok = call_errorfunc(self.errorfunc, errtoken, self)
File "/var/lang/lib/python3.8/site-packages/ply/yacc.py", line 192, in call_errorfunc
r = errorfunc(token)
File "/var/lang/lib/python3.8/site-packages/luqum/parser.py", line 357, in p_error
raise ParseSyntaxError("Syntax error in input : %s at %s!" % (error, pos))
luqum.exceptions.ParseSyntaxError: Syntax error in input : unexpected ':' at position 28!
Hi,
I'm experiencing errors parsing lucene strings that refer to a date-time value with timezone that is not wrapped with double-quotes. See for example:
I can surely try to workaround it with patching the input and wrapping it with double-quotes, but since Elasticsearch accepts this as is - I wonder if this is a real bug that can be fixed here.
https://www.elastic.co/guide/en/elasticsearch/reference/7.10/query-dsl-query-string-query.html#query-string-top-level-params
The text was updated successfully, but these errors were encountered: