zacharymorn commented on a change in pull request #25:
URL: https://github.com/apache/lucene/pull/25#discussion_r600993992



##########
File path: lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java
##########
@@ -388,6 +434,42 @@ private void processFacetFields(
     }
   }
 
+  private void indexDrillDownTerms(
+      Document doc, String indexFieldName, DimConfig ft, FacetLabel cp) {
+    if (ft.drillDownTermsIndexing != DrillDownTermsIndexing.NONE) {
+      // index full-path drill down term
+      doc.add(
+          new StringField(indexFieldName, pathToString(cp.components, 
cp.length), Field.Store.NO));
+
+      switch (ft.drillDownTermsIndexing) {
+        case NONE:

Review comment:
       So not checking `NONE` in this switch statement will actually cause this 
case (and the `FULL_PATH_ONLY` case) to fall through and reach the default 
branch, where an assertion error would be raised. I've considered not using 
`switch` due to these additional checks, but overall I still find them to be 
more readable than the original if-else-if-else branches.




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to