mdmarshmallow commented on a change in pull request #509: URL: https://github.com/apache/lucene/pull/509#discussion_r774240119
########## File path: lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java ########## @@ -471,19 +471,24 @@ private void indexDrillDownTerms( private void processSSDVFacetFields( Map<String, List<SortedSetDocValuesFacetField>> byField, Document doc) { + Set<String> addedPaths = new HashSet<>(); + for (Map.Entry<String, List<SortedSetDocValuesFacetField>> ent : byField.entrySet()) { String indexFieldName = ent.getKey(); for (SortedSetDocValuesFacetField facetField : ent.getValue()) { - FacetLabel facetLabel = new FacetLabel(facetField.dim, facetField.label); - String fullPath = pathToString(facetLabel.components, facetLabel.length); - - // For facet counts: - doc.add(new SortedSetDocValuesField(indexFieldName, new BytesRef(fullPath))); - - // For drill-down: - indexDrillDownTerms(doc, indexFieldName, getDimConfig(facetField.dim), facetLabel); + FacetLabel facetLabel = new FacetLabel(facetField.dim, facetField.path); + for (int i = 0; i < facetLabel.length; i++) { Review comment: Yes, though I do also use the ancestor path indexes for establishing parent/child and sibling relationships in `DefaultSortedSetDocValuesReaderState` (and made some optimizations around the fact that ancestor paths were indexed), but I want to say that it can still be done without the ancestor path indexing, I would just need to change how it is done. -- 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