lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] [Created] (LUCENE-8094) Improve TermInSetQuery.toString
Date Tue, 12 Dec 2017 16:22:00 GMT
Michael McCandless created LUCENE-8094:

             Summary: Improve TermInSetQuery.toString
                 Key: LUCENE-8094
             Project: Lucene - Core
          Issue Type: Improvement
            Reporter: Michael McCandless
             Fix For: master (8.0), 7.3

Today a {{TermInSetQuery}} on field F and terms A, B, C returns this from {{toString}}:

  F:A F:B F:C

But this gets misleading when you embed it in a {{BooleanQuery}} as a negated clause, which
then renders like this:

  -F:A F:B F:C

Making it look like only the first clause is negated when in fact they all are.

So ... I'd like to instead change it to:

F:(A B C)

I know {{Query.toString}} is simply best-effort, is not guaranteed to make something you can
then parse in any query parser back to itself, etc., but I think we should still try to make
a string that is not misleading when humans stare at it?

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message