bruno-roustant commented on code in PR #13327:
URL: https://github.com/apache/lucene/pull/13327#discussion_r1583136349


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/Lucene90BlockTreeTermsReader.java:
##########
@@ -113,7 +114,8 @@ public final class Lucene90BlockTreeTermsReader extends 
FieldsProducer {
   // produce DocsEnum on demand
   final PostingsReaderBase postingsReader;
 
-  private final Map<String, FieldReader> fieldMap;
+  private final FieldInfos fieldInfos;
+  private final IntObjectHashMap<FieldReader> fieldMap;

Review Comment:
   This PR proposes to leverage the existing field-name -> FieldInfo map in 
FieldInfos to not repeat the ref to the field name strings here. Instead use 
the field number (specific to the FieldInfos) as key, so that we can use a 
compact primitive map.
   
   Then below, in terms(String fieldName), we can use 
FieldInfos.fieldInfo(String fieldName) as a first mapping to the field number, 
and then use this compact map to get the Terms.



-- 
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