lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Octavian Mocanu <octavianmocanu.w...@gmail.com>
Subject StringIndexOutOfBoundsException with parser/EscapeQuerySyntaxImpl.java
Date Wed, 14 Nov 2018 16:09:14 GMT
Hi,

I'm not sure if the issue should be reported here or better to
dev@lucene.apache.org , but here it is.

When using "lucene-queryparser-6.3.0", specifically
"org/apache/lucene/queryparser/flexible/standard/parser/EscapeQuerySyntaxImpl.java"

when escaping strings containing extended unicode chars, and with a locale
distinct from that of the character set the string uses, the process fails,
with a "java.lang.StringIndexOutOfBoundsException".

The reason seems to be that the comparison is done by previously converting
all of the characters of the string to lower case chars, and by doing this,
the original string size isn't anymore the same, but less, as of the
transformed one, so that executing

org/apache/lucene/queryparser/flexible/standard/parser/EscapeQuerySyntaxImpl.java:89

fails.

I wonder whether the transformation to lower case is really needed when
treating the escape chars, since by avoiding it, the error may be avoided.

I am not aware if the issue has already been reported (could not find
anything related in https://issues.apache.org/jira/issues/ ).

Thank you!
Octavian

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message