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 2021/03/01 17:04:57 UTC

[GitHub] [lucene-solr] cpoerschke opened a new pull request #2442: SOLR-15205: don't mention (deprecated) CloudSolrClient.setIdField in javadocs

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


   https://issues.apache.org/jira/browse/SOLR-15205


----------------------------------------------------------------
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] dsmiley commented on a change in pull request #2442: SOLR-15205: don't mention (deprecated) CloudSolrClient.setIdField in javadocs

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



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
##########
@@ -91,6 +91,12 @@
 import static org.apache.solr.common.params.CommonParams.ADMIN_PATHS;
 import static org.apache.solr.common.params.CommonParams.ID;
 
+/**
+ * If you don't call the {@link #setIdField(String)} method and
+ * if your collection's document router has no route field then
+ * this class assumes the id field for your documents is called
+ * 'id'.
+ */

Review comment:
       Javadocs, particularly class javadocs, should start with a sentence about what this class is / is-for.  The javadoc you have here describes some details that is relevant but not something to *start* javadoc with.  So please add a sentence like "Base SolrClient for implementations optimized for SolrCloud.




----------------------------------------------------------------
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] dsmiley commented on a change in pull request #2442: SOLR-15205: don't mention (deprecated) CloudSolrClient.setIdField in javadocs

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



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
##########
@@ -32,10 +32,6 @@
  * Solr endpoints for SolrCloud collections, and then use the
  * {@link LBHttp2SolrClient} to issue requests.
  *
- * This class assumes the id field for your documents is called
- * 'id' - if this is not the case, you must set the right name

Review comment:
       What is coming from ZooKeeper?  Maybe the "route field" which is in the collection state (DocCollection) but not the uniqueKey field which is in the schema and AFAIK it not resolved by CloudSolrClient.




----------------------------------------------------------------
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] cpoerschke commented on a change in pull request #2442: SOLR-15205: don't mention (deprecated) CloudSolrClient.setIdField in javadocs

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



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
##########
@@ -32,10 +32,6 @@
  * Solr endpoints for SolrCloud collections, and then use the
  * {@link LBHttp2SolrClient} to issue requests.
  *
- * This class assumes the id field for your documents is called
- * 'id' - if this is not the case, you must set the right name

Review comment:
       Hmm, tricky. So the https://github.com/apache/lucene-solr/commit/f9410e14614d1f9ebb88226c287f38cd4d0b3d1f commit removes the `idField = ID` and replaces it with `routeFieldDeprecated = null` i.e. no more use of "id" there but ...
   
   When it comes to `routeFieldDeprecated` usage at https://github.com/apache/lucene-solr/blob/releases/lucene-solr%2F8.7.0/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java#L526-L527 we have
   ```
   ...
   String routeField = (routeFieldDeprecated != null) ? routeFieldDeprecated :
           (col.getRouter().getRouteField(col) == null) ? ID : col.getRouter().getRouteField(col);
   ...
   ```
   i.e. yes in conjunction with the "the field is automatically determined from Zookeeper" comment at https://github.com/apache/lucene-solr/blob/releases/lucene-solr%2F8.7.0/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java#L311 there is an "id" assumption of sorts, though in most use cases the field would be automatically determined from ZooKeeper I guess?




----------------------------------------------------------------
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] dsmiley commented on a change in pull request #2442: SOLR-15205: don't mention (deprecated) CloudSolrClient.setIdField in javadocs

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



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
##########
@@ -32,10 +32,6 @@
  * Solr endpoints for SolrCloud collections, and then use the
  * {@link LBHttp2SolrClient} to issue requests.
  *
- * This class assumes the id field for your documents is called
- * 'id' - if this is not the case, you must set the right name

Review comment:
       the latter part can go but isn't the first part of this still sound -- that we assume "id"?




----------------------------------------------------------------
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] cpoerschke commented on a change in pull request #2442: SOLR-15205: don't mention (deprecated) CloudSolrClient.setIdField in javadocs

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



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
##########
@@ -91,6 +91,12 @@
 import static org.apache.solr.common.params.CommonParams.ADMIN_PATHS;
 import static org.apache.solr.common.params.CommonParams.ID;
 
+/**
+ * If you don't call the {@link #setIdField(String)} method and
+ * if your collection's document router has no route field then
+ * this class assumes the id field for your documents is called
+ * 'id'.
+ */

Review comment:
       Hmm, yes, that's a fair point. Also the precommit checks don't like the `{@inheritDoc}` use in the derived class somehow (though elsewhere in the code base it is used) and the reworded content here does not meet the initial objective of the pull request which was to _not_ mention the deprecated `setIdField` method in the javadocs. Oh well, it was worth a try. Thanks @dsmiley for your input!
   
   




----------------------------------------------------------------
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] cpoerschke commented on a change in pull request #2442: SOLR-15205: don't mention (deprecated) CloudSolrClient.setIdField in javadocs

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



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
##########
@@ -91,6 +91,12 @@
 import static org.apache.solr.common.params.CommonParams.ADMIN_PATHS;
 import static org.apache.solr.common.params.CommonParams.ID;
 
+/**
+ * If you don't call the {@link #setIdField(String)} method and
+ * if your collection's document router has no route field then
+ * this class assumes the id field for your documents is called
+ * 'id'.
+ */

Review comment:
       This is relocated (to avoid duplication) from the two deriving classes and then reworded to try and make the context for the deprecated `setIdField` method clearer. Other than this usage I was unable to identify anywhere else where the cloud solr client assumes that the id field is called `"id"`. What do you think?




----------------------------------------------------------------
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] cpoerschke closed pull request #2442: SOLR-15205: don't mention (deprecated) CloudSolrClient.setIdField in javadocs

Posted by GitBox <gi...@apache.org>.
cpoerschke closed pull request #2442:
URL: https://github.com/apache/lucene-solr/pull/2442


   


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