You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/03/19 13:59:57 UTC

[GitHub] [solr] limingnihao opened a new pull request #35: SOLR-15273: Distributed Group Query supports rename unique key field name

limingnihao opened a new pull request #35:
URL: https://github.com/apache/solr/pull/35


   # Description
   
   Distributed group query, if rename the unique key field name, will be java.lang.NullPointerException.
   
   Because of without StoredFieldsShardResponseProcessor processing rename.
   
   # Solution
   
   In StoredFieldsShardResponseProcessorde process, increase the processing. if id was renamed we need to use the new name.
   
   # Tests
   
   Test whether renaming returns an error when grouping Query.
   
   # 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 `main` branch.
   - [x] I have run `./gradlew check`.
   - [x] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


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



[GitHub] [solr] cpoerschke merged pull request #35: SOLR-15273: Distributed Group Query supports rename unique key field name

Posted by GitBox <gi...@apache.org>.
cpoerschke merged pull request #35:
URL: https://github.com/apache/solr/pull/35


   


-- 
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@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] cpoerschke commented on a change in pull request #35: SOLR-15273: Distributed Group Query supports rename unique key field name

Posted by GitBox <gi...@apache.org>.
cpoerschke commented on a change in pull request #35:
URL: https://github.com/apache/solr/pull/35#discussion_r599576273



##########
File path: solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/StoredFieldsShardResponseProcessor.java
##########
@@ -38,6 +38,10 @@ public void process(ResponseBuilder rb, ShardRequest shardRequest) {
     SolrDocumentList docs = (SolrDocumentList)srsp.getSolrResponse().getResponse().get("response");
     String uniqueIdFieldName = rb.req.getSchema().getUniqueKeyField().getName();
 
+    if (rb.rsp.getReturnFields().getFieldRenames().get(uniqueIdFieldName) != null) {
+      // if id was renamed we need to use the new name
+      uniqueIdFieldName = rb.rsp.getReturnFields().getFieldRenames().get(uniqueIdFieldName);
+    }

Review comment:
       observation: for non-grouped queries the query component already has similar logic e.g. https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.8.1/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java#L1187-L1190




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



[GitHub] [solr] limingnihao commented on pull request #35: SOLR-15273: Distributed Group Query supports rename unique key field name

Posted by GitBox <gi...@apache.org>.
limingnihao commented on pull request #35:
URL: https://github.com/apache/solr/pull/35#issuecomment-808203920


   @cpoerschke I have added the solr/CHANGES.txt entry for this change in the Bug Fixes section for the 8.9.0. Please help to review it. Thanks.


-- 
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@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org