lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [lucenenet] 43081j opened a new issue #293: RegexpQuery doesn't maintain any reference to the Regexp
Date Thu, 04 Jun 2020 10:21:16 GMT

43081j opened a new issue #293:

   We're using your parser to parse lucene queries as part of a conversion mechanism we have,
so we traverse the AST in order to build up our own representation.
   The one missing part right now is that a RegexpQuery does not give access to the original
Regexp, or even the Term.
   Lets say you have:
   var ast = (RegexpQuery)parser.Parse("foo:/ab?def/", "all");
   There seems to be no way to access `ab?def`, as a term, string or regexp. By this point,
it has already been turned into an automaton and the original term has been thrown away or
is in a protected property.
   The parser should not make assumptions like this IMO. It is up to the consumer what we
do with the AST, rather than forcing us to use your "automaton" representation. Would it be
possible to somehow expose the untouched, original value of the query?

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.

For queries about this service, please contact Infrastructure at:

View raw message