lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <trej...@trypticon.org>
Subject Re: Range queries get misinterpreted when parsed twice via the "Standard" parsers
Date Fri, 10 Mar 2017 00:06:02 GMT
On Fri, 10 Mar 2017 at 01:19, Erick Erickson <erickerickson@gmail.com>
wrote:

> There has never been a guarantee that going back and forth between a
> parsed query and its string representation is idempotent. so this
> isn't supported.


Maybe delete the toQueryString method...

There is a fundamental design problem with it anyway, in that it produces a
syntax which isn't necessarily the one you parsed in the first place. We
ended up making a whole family of QuerySyntaxFormatter for all node classes
and had it produce exactly the syntax we consider the cleanest. (Still not
what the user typed in, but aiming to be better when the two differ.)

Although in this case, it does seem like it could have moved the field
outside the brackets to avoid this problem...

TX

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