mikemccand commented on code in PR #13328:
URL: https://github.com/apache/lucene/pull/13328#discussion_r1752005115


##########
lucene/sandbox/src/java/org/apache/lucene/sandbox/search/CombinedFieldQuery.java:
##########
@@ -163,11 +156,6 @@ public boolean equals(Object o) {
       FieldAndWeight that = (FieldAndWeight) o;
       return Float.compare(that.weight, weight) == 0 && Objects.equals(field, 
that.field);
     }

Review Comment:
   > (I tried to quickly look up what record does wrt equality for floats and 
doubles but couldn't find it, will look later)
   
   I found one mention of floating point numbers in the [JEP for 
records](https://openjdk.org/jeps/395):
   
   ```
   In addition, for all record classes the implicitly declared equals method is 
implemented so that it is reflexive and that it behaves consistently with 
hashCode for record classes that have floating point components. Again, 
explicitly declared equals and hashCode methods should behave similarly.
   ```
   
   I'm not sure I understand that paragraph :)



##########
lucene/MIGRATE.md:
##########
@@ -193,6 +193,7 @@ access the members using method calls instead of field 
accesses. Affected classe
 
 - `IOContext`, `MergeInfo`, and `FlushInfo` (GITHUB#13205)
 - `BooleanClause` (GITHUB#13261)
+- `CollectionStatistics`, `TermStatistics` and `LeafMetadata` (GITHUB#13328)

Review Comment:
   And  maybe change this wording too (same as `CHANGES.txt`)?  I think 
@jpountz asked for `TopDocs` to also be mentioned?



##########
lucene/CHANGES.txt:
##########
@@ -118,6 +118,8 @@ API Changes
   argument with a `FacetsCollectorManager` and update the return type to 
include both `TopDocs` results as well as
   facets results. (Luca Cavanna)
 
+* GITHUB#13328: Convert CollectionStatistics, TermStatistics and LeafMetadata 
etc. to record classes. (Shubham Chaudhary)

Review Comment:
   Maybe reword to `Convert many basic Lucene classes to record classes, 
including X, Y, and Z`?  It's not just these three classes, if I'm reading the 
PR correctly, and the `etc.` should not have so much power ;)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to