gautamworah96 commented on a change in pull request #220: URL: https://github.com/apache/lucene/pull/220#discussion_r677669790
########## 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: So when we first initialize the `fieldPath` variable it is [initialized](https://github.com/apache/lucene/blob/d5d6dc079395c47cd6d12dcce3bcfdd2c7d9dc63/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java#L185) with `Field.Store.NO`. Then when we realize that the field has to be stored as a StringField, we need its value as well, so I reassign it with a `new StringField(Consts.FULL, fieldPath, Field.Store.YES)` statement. > Maybe just move the above line inside the if? Sure > why don't we also re-use the BinaryDocValues field Hmmm. Could you elaborate a bit? The field depends on the input `FacetLabel categoryPath` -- 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