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



##########
File path: lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java
##########
@@ -65,6 +65,38 @@
   // int/float/bytes in a single indexed field:
   private final Map<String, String> assocDimTypes = new ConcurrentHashMap<>();
 
+  /**
+   * Drill down terms indexing option to control whether dimension and 
sub-path terms should be
+   * indexed.
+   */
+  public enum DrillDownTermsIndexing {
+    /**
+     * Index only full-path drill down terms. No dimension nor sub-path 
indexing. e.g. for
+     * FacetField("a", "foo/bar/baz"), we would only index value "a foo bar 
baz".

Review comment:
       Instead of `"a foo bar baz"` could we consistently use `/`, i.e. change 
it to `a/foo/bar/baz`?

##########
File path: lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java
##########
@@ -65,6 +65,38 @@
   // int/float/bytes in a single indexed field:
   private final Map<String, String> assocDimTypes = new ConcurrentHashMap<>();
 
+  /**
+   * Drill down terms indexing option to control whether dimension and 
sub-path terms should be
+   * indexed.
+   */
+  public enum DrillDownTermsIndexing {
+    /**
+     * Index only full-path drill down terms. No dimension nor sub-path 
indexing. e.g. for
+     * FacetField("a", "foo/bar/baz"), we would only index value "a foo bar 
baz".
+     */
+    FULL_PATH_ONLY,
+
+    /**
+     * Index sub-path and full-path down terms. No dimension indexing. e.g. 
for FacetField("a",
+     * "foo/bar/baz"), we would only index values "a foo", "a foo bar", and "a 
foo baz".

Review comment:
       And put `/` in the examples too, e.g. `a/foo`, `a/foo/bar`, ...

##########
File path: lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java
##########
@@ -372,7 +403,10 @@ private void processFacetFields(
 
         // Drill down:

Review comment:
       I think this approach is good, i.e. "disable drill down" would also mean 
"disable the full path drill down", i.e. it would mean this `dim` adds zero 
tokens to the inverted index.

##########
File path: lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java
##########
@@ -65,6 +65,38 @@
   // int/float/bytes in a single indexed field:
   private final Map<String, String> assocDimTypes = new ConcurrentHashMap<>();
 
+  /**
+   * Drill down terms indexing option to control whether dimension and 
sub-path terms should be
+   * indexed.
+   */
+  public enum DrillDownTermsIndexing {
+    /**
+     * Index only full-path drill down terms. No dimension nor sub-path 
indexing. e.g. for
+     * FacetField("a", "foo/bar/baz"), we would only index value "a foo bar 
baz".
+     */
+    FULL_PATH_ONLY,
+
+    /**
+     * Index sub-path and full-path down terms. No dimension indexing. e.g. 
for FacetField("a",

Review comment:
       Insert `drill` before `down terms`?

##########
File path: lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java
##########
@@ -65,6 +65,38 @@
   // int/float/bytes in a single indexed field:
   private final Map<String, String> assocDimTypes = new ConcurrentHashMap<>();
 
+  /**
+   * Drill down terms indexing option to control whether dimension and 
sub-path terms should be
+   * indexed.
+   */
+  public enum DrillDownTermsIndexing {
+    /**
+     * Index only full-path drill down terms. No dimension nor sub-path 
indexing. e.g. for
+     * FacetField("a", "foo/bar/baz"), we would only index value "a foo bar 
baz".
+     */
+    FULL_PATH_ONLY,
+
+    /**
+     * Index sub-path and full-path down terms. No dimension indexing. e.g. 
for FacetField("a",
+     * "foo/bar/baz"), we would only index values "a foo", "a foo bar", and "a 
foo baz".
+     */
+    SUB_PATH_AND_FULL_PATH,
+
+    /**
+     * Index dimension and full-path drill down terms. No sub-path indexing. 
e.g. for
+     * FacetField("a", "foo/bar/baz"), we would only index values "a" and "a 
foo baz". This is weird
+     * usage and currently not available.
+     */
+    // DIMENSION_AND_FULL_PATH,
+
+    /**
+     * Index dimension, sub-path and full-path drill down terms. e.g. for 
FacetField("a",
+     * "foo/bar/baz"), we would index all values "a", "a foo", "a foo bar", 
and "a foo baz". This is
+     * the default / existing behavior.
+     */
+    ALL

Review comment:
       Hmm don't we also need a `NONE`?  I.e. disable all drill down indexing 
entirely (the original goal of the issue I think)?




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