I'm new to Solr and am exploring the idea of creating shards on the fly. Once the shards have been created and populated, I am hoping to use the "shards" query parameter to combine results from multiple shards into a single results set.
By following the "Testing Index Sharding on Two Local Servers" instructions[1] in the wiki I'm able to target two different shards individually. It works great, I get three results from one shard and one result from another shard. When I select them both with the following query (straight from the wiki) I get all four results: curl 'http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solr&indent=true&q=ipod+solr' My immediate problem is trying to figure out how to convert this example from two instances of Solr running on different ports (8983 and 7574) that each have a single shard to one instance of Solr that has two shards. Various posts[2] suggest this is possible but refer to older versions of Solr and the instructions don't seem to work for Solr 4.7.0. When I try the CREATESHARD API call from the wiki[3] I get "Solr instance is not running in SolrCloud mode" which isn't a huge surprise because it's documented under the Collections API under SolrCloud. I don't know anything about SolrCloud. Not yet, anyway. My experience with Solr so far involves running `java -jar start.jar` from the "example" directory. I barely know what Zookeeper is. My goal for now is to use CREATESHARD to create a new shard in a single Solr instance and then verify it was created with the STATUS[4] command. Can anyone please explain how I would accomplish this? The thought is to have one shard for public data and a shard per user, which is why I'm asking about creating the shards on the fly. (Logged in users would see a mix of public and private data.) For now I'd like to keep using a single Solr instance for simplicity. For more background on where I'm coming from, please see http://colabti.org/irclogger/irclogger_log/lucene-dev?date=2014-02-06#l99 and https://trello.com/c/5z5PpR4r/50-design-solr-document-level-security-filter-solution Thanks, Phil 1. https://cwiki.apache.org/confluence/display/solr/Distributed+Search+with+Index+Sharding 2. http://solr.pl/en/2013/01/07/solr-4-1-solrcloud-multiple-shards-on-the-same-solr-node/ 3. i.e. curl 'http://localhost:8983/solr/admin/collections?action=CREATESHARD&shard=shardName&collection=collection1' from https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-CreateaShard 4. i.e. http://localhost:8983/solr/admin/cores?action=STATUS via https://wiki.apache.org/solr/CoreAdmin#STATUS (or whatever the right command would be to list shards) -- Philip Durbin Software Developer for http://thedata.org http://www.iq.harvard.edu/people/philip-durbin