mikemccand commented on a change in pull request #25:
URL: https://github.com/apache/lucene/pull/25#discussion_r598321546
##########
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,
Review comment:
Actually, I am now thinking that this case might be helpful? (It was
the "only dim and NOT full path" case that I thought seems pointless) ... this
case could e.g. be used to find all docs that have at least one facet label on
the dimension. So, maybe uncomment this and fixup the doc, e.g. add `/` in,
remove the weirdness statement?
##########
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,
Review comment:
Maybe rename to `ALL_PATHS_NO_DIM`?
--
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]