You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/09/21 10:07:44 UTC

[GitHub] [lucene] bruno-roustant commented on a change in pull request #311: LUCENE-10097: Replace TreeMap use by HashMap when unnecessary

bruno-roustant commented on a change in pull request #311:
URL: https://github.com/apache/lucene/pull/311#discussion_r712893122



##########
File path: lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldPostingsFormat.java
##########
@@ -340,9 +342,15 @@ public FieldsReader(final SegmentReadState readState) throws IOException {
       this.segment = readState.segmentInfo.name;
     }
 
+    private static List<String> buildFieldList(Map<String, FieldsProducer> fields) {
+      List<String> fieldList = new ArrayList<>(fields.keySet());
+      fieldList.sort(null);
+      return Collections.unmodifiableList(fieldList);
+    }

Review comment:
       Thanks, it's clearer indeed.




-- 
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-unsubscribe@lucene.apache.org

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



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