did you encode the query as a regexp: e.g. "/[abcde+/" or "/a{1,5}/" ?

https://lucene.apache.org/core/4_9_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#Regexp_Searches

On Mon, Sep 13, 2021 at 1:22 PM Patrick Zhai <[email protected]> wrote:
>
> Hi folks,
> I'm currently trying to benchmark some regexp queries and found that the 
> default QueryParser (o.a.l.queryparser.classic.QueryParser) that luceneutil 
> is using is not able to parse regexps such as: "[abcde]+" or "a{1,5}".
>
> The current workaround is to add another "if" logic in the TaskParser so that 
> when it sees "regexp" tag it will created a RegexpQuery without going through 
> QueryParser, but I still wonder whether that QueryParser is only able to 
> parse WildcardQuery but not RegexpQuery and do we have another QueryParser 
> that could parse the RegexpQuery?
>
> Best,
> Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to