[ https://issues.apache.org/jira/browse/LUCENE-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-8094: --------------------------------------- Attachment: LUCENE-8094.patch Simple patch; I think it's ready. > Improve TermInSetQuery.toString > ------------------------------- > > Key: LUCENE-8094 > URL: https://issues.apache.org/jira/browse/LUCENE-8094 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Michael McCandless > Fix For: master (8.0), 7.3 > > Attachments: LUCENE-8094.patch > > > Today a {{TermInSetQuery}} on field F and terms A, B, C returns this from > {{toString}}: > {noformat} > F:A F:B F:C > {noformat} > But this gets misleading when you embed it in a {{BooleanQuery}} as a negated > clause, which then renders like this: > {noformat} > -F:A F:B F:C > {noformat} > 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: > {noformat} > F:(A B C) > {noformat} > 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 (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org