[jira] [Commented] (LUCENE-8664) Add equals/hashcode to TotalHits

2019-01-30 Thread Simon Willnauer (JIRA)


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

Simon Willnauer commented on LUCENE-8664:
-

pushed - thanks [~lucacavanna]

> Add equals/hashcode to TotalHits
> 
>
> Key: LUCENE-8664
> URL: https://issues.apache.org/jira/browse/LUCENE-8664
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Luca Cavanna
>Priority: Minor
> Fix For: 8.0, master (9.0)
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I think it would be convenient to add equals/hashcode methods to the 
> TotalHits class. I opened a PR here: 
> [https://github.com/apache/lucene-solr/pull/552] .



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (LUCENE-8664) Add equals/hashcode to TotalHits

2019-01-30 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on LUCENE-8664:
-

Commit 5e16a7771a42a45c9351a6f489618f35fb1f8b23 in lucene-solr's branch 
refs/heads/branch_8x from Luca Cavanna
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=5e16a77 ]

LUCENE-8664: Add equals/hashcode methods to TotalHits class

Adding equals/hashcode to TotalHits is convenient for quick comparisons, 
especially for users that may use it as part of bigger objects that have their 
own equals/hashcode.


> Add equals/hashcode to TotalHits
> 
>
> Key: LUCENE-8664
> URL: https://issues.apache.org/jira/browse/LUCENE-8664
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Luca Cavanna
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I think it would be convenient to add equals/hashcode methods to the 
> TotalHits class. I opened a PR here: 
> [https://github.com/apache/lucene-solr/pull/552] .



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (LUCENE-8664) Add equals/hashcode to TotalHits

2019-01-30 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on LUCENE-8664:
-

Commit 5dad8ced850a3fb7de4a2fbb302daf6ab5880b73 in lucene-solr's branch 
refs/heads/branch_8_0 from Luca Cavanna
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=5dad8ce ]

LUCENE-8664: Add equals/hashcode methods to TotalHits class

Adding equals/hashcode to TotalHits is convenient for quick comparisons, 
especially for users that may use it as part of bigger objects that have their 
own equals/hashcode.


> Add equals/hashcode to TotalHits
> 
>
> Key: LUCENE-8664
> URL: https://issues.apache.org/jira/browse/LUCENE-8664
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Luca Cavanna
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I think it would be convenient to add equals/hashcode methods to the 
> TotalHits class. I opened a PR here: 
> [https://github.com/apache/lucene-solr/pull/552] .



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (LUCENE-8664) Add equals/hashcode to TotalHits

2019-01-30 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on LUCENE-8664:
-

Commit 57f693bfc2eb23f7882bbc9e475c95fa30c25bb9 in lucene-solr's branch 
refs/heads/master from Luca Cavanna
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=57f693b ]

LUCENE-8664: Add equals/hashcode methods to TotalHits class

Adding equals/hashcode to TotalHits is convenient for quick comparisons, 
especially for users that may use it as part of bigger objects that have their 
own equals/hashcode.

> Add equals/hashcode to TotalHits
> 
>
> Key: LUCENE-8664
> URL: https://issues.apache.org/jira/browse/LUCENE-8664
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Luca Cavanna
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I think it would be convenient to add equals/hashcode methods to the 
> TotalHits class. I opened a PR here: 
> [https://github.com/apache/lucene-solr/pull/552] .



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (LUCENE-8664) Add equals/hashcode to TotalHits

2019-01-29 Thread Luca Cavanna (JIRA)


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

Luca Cavanna commented on LUCENE-8664:
--

I am not using TotalHits in a map. I would benefit from the equals method for 
comparisons in tests. For instance in Elasticsearch we return the lucene 
TotalHits to users as part of bigger objects that have their own equals method. 
We end up wrapping TotalHits into another internal class that has its own 
equals/hashcode (among others). Having equals/hashcode built-in into lucene 
would remove the need for a wrapper class, as well as making equality 
comparisons a one-liner, especially when comparing multiple instances of 
objects holding TotalHits. This is a minor thing obviously, but I did not think 
it would be a bug to consider two different TotalHits instances that have same 
value and relation equal? I was chatting to [~jim.ferenczi] about this and we 
thought we should propose adding this to Lucene. Happy to close this if you 
think it should not be done.

> Add equals/hashcode to TotalHits
> 
>
> Key: LUCENE-8664
> URL: https://issues.apache.org/jira/browse/LUCENE-8664
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Luca Cavanna
>Priority: Minor
>
> I think it would be convenient to add equals/hashcode methods to the 
> TotalHits class. I opened a PR here: 
> [https://github.com/apache/lucene-solr/pull/552] .



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (LUCENE-8664) Add equals/hashcode to TotalHits

2019-01-29 Thread Adrien Grand (JIRA)


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

Adrien Grand commented on LUCENE-8664:
--

I am not sure we should do this, I can't think of any use-case of 
TotalHits#equals that wouldn't be a bug given that two different objects may 
represent the same hit count?

> Add equals/hashcode to TotalHits
> 
>
> Key: LUCENE-8664
> URL: https://issues.apache.org/jira/browse/LUCENE-8664
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Luca Cavanna
>Priority: Minor
>
> I think it would be convenient to add equals/hashcode methods to the 
> TotalHits class. I opened a PR here: 
> [https://github.com/apache/lucene-solr/pull/552] .



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (LUCENE-8664) Add equals/hashcode to TotalHits

2019-01-29 Thread Simon Willnauer (JIRA)


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

Simon Willnauer commented on LUCENE-8664:
-

[~lucacavanna] what's the usecase for this? Why are you trying to put this into 
a map or something? Can you explain this a bit further?

> Add equals/hashcode to TotalHits
> 
>
> Key: LUCENE-8664
> URL: https://issues.apache.org/jira/browse/LUCENE-8664
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Luca Cavanna
>Priority: Minor
>
> I think it would be convenient to add equals/hashcode methods to the 
> TotalHits class. I opened a PR here: 
> [https://github.com/apache/lucene-solr/pull/552] .



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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