dsmiley commented on code in PR #1371:
URL: https://github.com/apache/lucene-solr/pull/1371#discussion_r2807124340


##########
solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java:
##########
@@ -122,12 +122,57 @@ field collapsing (with ngroups) when the number of 
distinct groups
 public class CollapsingQParserPlugin extends QParserPlugin {
 
   public static final String NAME = "collapse";
+  public static final String HINT_TOP_FC = "top_fc";
+
+  /**
+   * @deprecated use {@link NullPolicy} instead.
+   */
+  @Deprecated
   public static final String NULL_COLLAPSE = "collapse";
+  @Deprecated
   public static final String NULL_IGNORE = "ignore";
+  @Deprecated
   public static final String NULL_EXPAND = "expand";
-  public static final String HINT_TOP_FC = "top_fc";
+  @Deprecated
   public static final String HINT_MULTI_DOCVALUES = "multi_docvalues";
 
+  public enum NullPolicy {
+    IGNORE("ignore", 0),
+    COLLAPSE("collapse", 1),
+    EXPAND("expand", 2);
+
+    private final String name;
+    private final int code;

Review Comment:
   I love the introduction of this enum, but don't get the point/purpose of the 
`code` integer.  BTW, in case you something like this was needed (and I don't 
see it), all Enums have an `ordinal()` ;-)



-- 
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: [email protected]

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