Solr
  1. Solr
  2. SOLR-2287

SolrCloud - Allow users to query by multiple, compatible collections

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      This code fixes the todo items mentioned on the SolrCloud wiki:
      -optionally allow user to query by collection
      -optionally allow user to query by multiple collections (assume schemas are compatible)

      We are going to put a patch to see if anyone has any trouble with this code and/or if there is any comments on how to improve this code.

      Unfortunately, as of now, we don't have a test class as we are working on it. We are sorry about this.

      1. SOLR-2287.patch
        15 kB
        Alex Cowell
      2. SOLR-2287.patch
        19 kB
        Alex Cowell
      3. SOLR-2287.patch
        3 kB
        Soheb Mahmood

        Activity

        Hide
        Soheb Mahmood added a comment -

        This patch contains the source code to allow users to query via multiple collections. It unfortunately does not come with any test cases.

        Show
        Soheb Mahmood added a comment - This patch contains the source code to allow users to query via multiple collections. It unfortunately does not come with any test cases.
        Hide
        Alex Cowell added a comment -

        Added a test class which tests basic functionality for 3 collections but should be expanded upon.

        Show
        Alex Cowell added a comment - Added a test class which tests basic functionality for 3 collections but should be expanded upon.
        Hide
        Alex Cowell added a comment -

        Removed unnecessary XML solr config files from previous patch and added flixible code to the test class which will create custom config files for each specified collection.

        Need to add code to remove them during teardown.

        Show
        Alex Cowell added a comment - Removed unnecessary XML solr config files from previous patch and added flixible code to the test class which will create custom config files for each specified collection. Need to add code to remove them during teardown.
        Hide
        Yonik Seeley added a comment -

        Removed unnecessary XML solr config files from previous patch and added flixible code to the test class which will create custom config files for each specified collection.

        Perhaps a more flexible alternative would be to create collections on the fly and not through config?
        http://wiki.apache.org/solr/SolrCloud#Creating_cores_via_CoreAdmin

        Show
        Yonik Seeley added a comment - Removed unnecessary XML solr config files from previous patch and added flixible code to the test class which will create custom config files for each specified collection. Perhaps a more flexible alternative would be to create collections on the fly and not through config? http://wiki.apache.org/solr/SolrCloud#Creating_cores_via_CoreAdmin
        Hide
        Mark Miller added a comment -

        Thanks guys! Sorry for the long wait on this one - we should really get this in.

        Show
        Mark Miller added a comment - Thanks guys! Sorry for the long wait on this one - we should really get this in.
        Hide
        Mark Miller added a comment -

        Okay, I have written a test for this by creating new collections on the fly and I cleaned up a bit and fixed a bug when you have the same shard names in different collections by creating a new shard key that is combined with the collection name. I've committed to the solrcloud branch.

        Thanks again!

        Show
        Mark Miller added a comment - Okay, I have written a test for this by creating new collections on the fly and I cleaned up a bit and fixed a bug when you have the same shard names in different collections by creating a new shard key that is combined with the collection name. I've committed to the solrcloud branch. Thanks again!
        Hide
        Mark Miller added a comment -

        This is in trunk now - thanks again!

        Show
        Mark Miller added a comment - This is in trunk now - thanks again!

          People

          • Assignee:
            Mark Miller
            Reporter:
            Soheb Mahmood
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development