s1monw commented on code in PR #12836:
URL: https://github.com/apache/lucene/pull/12836#discussion_r1403570681
##########
lucene/core/src/java/org/apache/lucene/index/IndexWriter.java:
##########
@@ -5237,13 +5234,10 @@ public int get(int docID) {
for (int i = 0; i < docMaps.length; ++i) {
MergeState.DocMap reorderDocMap = reorderDocMaps[i];
docMaps[i] =
- new MergeState.DocMap() {
- @Override
- public int get(int docID) {
- int reorderedDocId = reorderDocMap.get(docID);
- int compactedDocId = compactionDocMap.get(reorderedDocId);
- return compactedDocId;
- }
+ docID -> {
+ int reorderedDocId = reorderDocMap.get(docID);
+ int compactedDocId = compactionDocMap.get(reorderedDocId);
+ return compactedDocId;
Review Comment:
yeah I am a bit afraid of the boxing that would happen here but we can for
sure remove the variables
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]