Solr
  1. Solr
  2. SOLR-7155

Add an optional 'collection' parameter to all SolrClient methods

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1
    • Component/s: None
    • Labels:
      None

      Description

      As discussed on SOLR-7127.

      1. SOLR-7155.patch
        71 kB
        Alan Woodward

        Activity

        Hide
        Alan Woodward added a comment -

        Patch. Requires the patches from SOLR-7145 and SOLR-7151 to be applied first.

        This just adds the capability to select a collection at query time to CloudSolrClient. For HttpSolrClient it's a no-op, although that should be easy enough to add in a follow up issue. I've also added better javadocs to SolrClient, and moved some methods that were only in HttpSolrClient up to the base class.

        All tests pass.

        Show
        Alan Woodward added a comment - Patch. Requires the patches from SOLR-7145 and SOLR-7151 to be applied first. This just adds the capability to select a collection at query time to CloudSolrClient. For HttpSolrClient it's a no-op, although that should be easy enough to add in a follow up issue. I've also added better javadocs to SolrClient, and moved some methods that were only in HttpSolrClient up to the base class. All tests pass.
        Hide
        Alan Woodward added a comment -

        Any comments on this one? It cleans up my client code quite nicely.

        Show
        Alan Woodward added a comment - Any comments on this one? It cleans up my client code quite nicely.
        Hide
        Mark Miller added a comment -

        Yeesh, look at this method proliferation...

        j/k, +1, if people think this is better than the other approach.

        As I said in the other issue, I think from the user perspective it's a bit simpler to grok and deal with.

        Show
        Mark Miller added a comment - Yeesh, look at this method proliferation... j/k, +1, if people think this is better than the other approach. As I said in the other issue, I think from the user perspective it's a bit simpler to grok and deal with.
        Hide
        Alan Woodward added a comment -
        Show
        Alan Woodward added a comment - Mark Miller
        Hide
        ASF subversion and git services added a comment -

        Commit 1664310 from Alan Woodward in branch 'dev/trunk'
        [ https://svn.apache.org/r1664310 ]

        SOLR-7155: Add optional collection parameter to all SolrClient methods

        Show
        ASF subversion and git services added a comment - Commit 1664310 from Alan Woodward in branch 'dev/trunk' [ https://svn.apache.org/r1664310 ] SOLR-7155 : Add optional collection parameter to all SolrClient methods
        Hide
        ASF subversion and git services added a comment -

        Commit 1664312 from Alan Woodward in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1664312 ]

        SOLR-7155: Add optional collection parameter to all SolrClient methods

        Show
        ASF subversion and git services added a comment - Commit 1664312 from Alan Woodward in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1664312 ] SOLR-7155 : Add optional collection parameter to all SolrClient methods
        Hide
        Shawn Heisey added a comment - - edited

        Just peeked briefly at the changes.

        I don't know if it makes any sense to include these parameters on SolrClient ... isn't CloudSolrClient the only implementation that will use them? The implementation of the new HttpSolrClient#request method completely ignores the collection parameter. I can foresee situations where someone implements code using that method in HttpSolrServer and then wonders why it doesn't make requests to the core that they listed for the collection parameter.

        Show
        Shawn Heisey added a comment - - edited Just peeked briefly at the changes. I don't know if it makes any sense to include these parameters on SolrClient ... isn't CloudSolrClient the only implementation that will use them? The implementation of the new HttpSolrClient#request method completely ignores the collection parameter. I can foresee situations where someone implements code using that method in HttpSolrServer and then wonders why it doesn't make requests to the core that they listed for the collection parameter.
        Hide
        Alan Woodward added a comment -

        Shawn: see SOLR-7201

        Show
        Alan Woodward added a comment - Shawn: see SOLR-7201
        Hide
        Timothy Potter added a comment -

        Bulk close after 5.1 release

        Show
        Timothy Potter added a comment - Bulk close after 5.1 release

          People

          • Assignee:
            Alan Woodward
            Reporter:
            Alan Woodward
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development