You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/08/01 09:45:30 UTC

[GitHub] [lucene-solr] munendrasn commented on a change in pull request #1707: SOLR-14692: Allow 'method' specification on JSON Facet join domain transforms

munendrasn commented on a change in pull request #1707:
URL: https://github.com/apache/lucene-solr/pull/1707#discussion_r463944761



##########
File path: solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
##########
@@ -182,9 +203,34 @@ public Query parse() throws SyntaxError {
    * @param subQuery the query to define the starting set of documents on the "left side" of the join
    * @param fromField "left side" field name to use in the join
    * @param toField "right side" field name to use in the join
+   * @param method indicates which implementation should be used to process the join.  Currently only 'index',
+   *               'dvWithScore', and 'topLevelDV' are supported.
    */
-  public static Query createJoinQuery(Query subQuery, String fromField, String toField) {
-    return new JoinQuery(fromField, toField, null, subQuery);
+  public static Query createJoinQuery(Query subQuery, String fromField, String toField, String method) {
+    final EnumSet<Method> methodWhitelist = EnumSet.of(Method.index, Method.topLevelDV, Method.dvWithScore);

Review comment:
       I think this could be reused by creating static enumSet

##########
File path: solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java
##########
@@ -163,15 +166,23 @@ public boolean canBecomeNonEmpty() {
 
     /** Are we doing a query time join across other documents */
     public static class JoinField {
+      public static final String FROM_PARAM = "from";
+      public static final String TO_PARAM = "to";
+      public static final String METHOD_PARAM = "method";
+      public static final Set<String> SUPPORTED_JOIN_PROPERTIES = Sets.newHashSet(FROM_PARAM, TO_PARAM, METHOD_PARAM);

Review comment:
       these variables could be package-private or preferably private




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org