mikemccand commented on a change in pull request #220:
URL: https://github.com/apache/lucene/pull/220#discussion_r677908217



##########
File path: 
lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
##########
@@ -475,8 +477,15 @@ private int addCategoryDocument(FacetLabel categoryPath, 
int parent) throws IOEx
 
     String fieldPath = FacetsConfig.pathToString(categoryPath.components, 
categoryPath.length);
     fullPathField.setStringValue(fieldPath);
+
+    if (useOlderStoredFieldIndex) {
+      fullPathField = new StringField(Consts.FULL, fieldPath, Field.Store.YES);

Review comment:
       OK it's just super confusing that we act like we will reuse it (by 
creating it in ctor) but then sometimes overwrite it and other times re-use it.
   
   Couldn't we init it with the right `Field.Store.YES|NO` option up front, 
since we know in ctor which way it'll go, and then just always re-use it?
   
   And let's scratch my suggestion to also reuse the `BDV` field -- let's just 
make a new one each time like you are doing.




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