lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LUCENE-5220) Expression SortField has crappy toString/bad equals/hashcode
Date Wed, 18 Sep 2013 21:58:54 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-5220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robert Muir resolved LUCENE-5220.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 4.6
                   5.0
    
> Expression SortField has crappy toString/bad equals/hashcode
> ------------------------------------------------------------
>
>                 Key: LUCENE-5220
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5220
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 4.6
>            Reporter: Robert Muir
>             Fix For: 5.0, 4.6
>
>         Attachments: LUCENE-5220.patch
>
>
> While doing some unrelated debugging:
> I noticed when printing the Sort, the expressions get the inherited toString for a CUSTOM
comparator, which is not very good:
> {noformat}
> <custom:"sqrt(_score) + ln(popularity)": null>!
> {noformat}
> I think its better if it looks something like this instead:
> {noformat}
> <expr "sqrt(_score) + ln(popularity)">!
> {noformat}
> Also equals/hashcode is wrong: it will bogusly report equals(true) if the expression
is the same: but bindings could be different!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message