lucene-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/LUCENE-6305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14593447#comment-14593447
] 

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
problem?


> BooleanQuery.equals should ignore clause order
> ----------------------------------------------
>
>                 Key: LUCENE-6305
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6305
>             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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message