lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Smith (JIRA)" <>
Subject [jira] [Commented] (LUCENE-6305) BooleanQuery.equals should ignore clause order
Date Fri, 19 Jun 2015 14:13:00 GMT


Terry Smith commented on LUCENE-6305:

Having BooleanQuery.equals() ignore order is a great idea but I think it'd be better if we
could preserve the original clause order for Query.toString(), the Explanation, debugging
and test expectations. 

Additionally, I've been burnt by JVM changes to String.hashCode() that cause HashMap<String,?>
to order entries differently when run in a newer JVM. Are the Query hash codes immune to this

> BooleanQuery.equals should ignore clause order
> ----------------------------------------------
>                 Key: LUCENE-6305
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-6305.patch
> BooleanQuery.equals is sensible to the order in which clauses have been added. So for
instance "+A +B" would be considered different from "+B +A" although it generates the same
matches and scores.

This message was sent by Atlassian JIRA

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

View raw message