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/07/30 21:02:30 UTC

[GitHub] [lucene-solr] gerlowskija opened a new pull request #1707: SOLR-14692: Allow 'method' specification on JSON Facet join domain transforms

gerlowskija opened a new pull request #1707:
URL: https://github.com/apache/lucene-solr/pull/1707


   # Description
   
   Solr offers several different join implementations which can be switched off providing the "method" local-param on JoinQuery's.  Each of these implementations has different performance characteristics and can behave very differently depending on a user's data and use case.
   
   When joins are used internally as a part of JSON Faceting's "join" domain-transform though, users have no way to specify which implementation they would like to use.  We should correct this by adding a "method" property to the join domain-transform.  This will let user's choose the join that's most performant for their use case during JSON Facet requests.
   
   
   # Solution
   
   Adds parsing to FacetRequest for a 'method' value, which is then forwarded to JoinQParserPlugin.createJoinQuery to create the appropriate join-type.
   
   # Tests
   
   None, yet.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [X] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [X] I have created a Jira issue and added the issue ID to my pull request title.
   - [X] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
   - [X] I have developed this patch against the `master` branch.
   - [ ] I have run `ant precommit` and the appropriate test suite.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Ref Guide](https://github.com/apache/lucene-solr/tree/master/solr/solr-ref-guide) (for Solr changes only).
   


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


[GitHub] [lucene-solr] gerlowskija merged pull request #1707: SOLR-14692: Allow 'method' specification on JSON Facet join domain transforms

Posted by GitBox <gi...@apache.org>.
gerlowskija merged pull request #1707:
URL: https://github.com/apache/lucene-solr/pull/1707


   


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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
gerlowskija commented on pull request #1707:
URL: https://github.com/apache/lucene-solr/pull/1707#issuecomment-671912624


   Thanks for the review Munendra; I made the changes you suggested.  Merging now.


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


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

Posted by GitBox <gi...@apache.org>.
munendrasn commented on a change in pull request #1707:
URL: https://github.com/apache/lucene-solr/pull/1707#discussion_r463944894



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




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