Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-13719

SolrClient.ping() in 8.2, using SolrJ

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 8.2
    • 8.3
    • clients - java
    • linux mint 19,  java8

    Description

      I started a local SolrCloud instance with two nodes and two replicas per node.  I created one empty collection on each node.  So I guess I have two shard per collection.
       
      I tried to use the ping method in Solrj to verify my connected client.  When I try to use it, it throws ...
       
      Caused by: org.apache.solr.common.SolrException: No collection param specified on request and no default collection has been set: []
      at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.sendRequest(BaseCloudSolrClient.java:1071) ~[solr-solrj-8.2.0.jar:8.2.0 31d7ec7bbfdcd2c4cc61d9d35e962165410b65fe - ivera - 2019-07-19 15:11:07]
       
      I cannot pass a collection name to the ping request.  And the CloudSolrClient.Builder does not allow me to declare a default collection.  BaseCloudSolrClient.setDefaultCollection(String) is effectively deprecated because CloudSolrClient no longer has a public constructor. 
       
      Can we add an argument to the Builder constructor to accept a string for the default collection?  Or a new setter on the Builder?

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mkhl Mikhail Khludnev
            benanas Benjamin Wade Friedman
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment