Maybe shard.keys? See: https://lucidworks.com/2013/06/13/solr-cloud-document-routing/
Best, Erick On Tue, Jul 11, 2017 at 4:24 AM, philippa griggs <philippa.gri...@hotmail.co.uk> wrote: > Hello, > > > Solr 5.4.1 > > > I have two collections ‘Online’ and ‘Offline’ both collections have an > implicit router and are sharded into weekly cores (for example an online > shard would be Online_20170605). I have created an alias to query both > collections called ‘AllData’. I want to query the alias but specify the > shards. So something like this: > > > http://localhost:8983/solr/AllData/select?q=*%3A*&sort=Session_UTCStartTime+desc&wt=json&indent=true&shards=Online_20170605,Offline_20170529 > > > > However I have noticed that this doesn’t work. If I create the alias like > this : > > > http://localhost:8983/solr/admin/collections?action=CREATEALIAS&name=AllData&collections=Online,Offline > > > (with the Online collection mentioned first) > > > I can use Online_20170605 as a shard but not the Offline shard, for that I > would have to specify the location of the shard. > > > http://localhost:8983/solr/AllData/select?q=*%3A*&sort=Session_UTCStartTime+desc&wt=json&indent=true&shards=Online_20170605,localhost:8983/solr/offline > > > If I delete the alias and recreate it with the Offline collection mentioned > first: > > > http://localhost:8983/solr/admin/collections?action=CREATEALIAS&name=AllData&collections=Offline,Online > > > I can use the Offline_20170529 as a shard but then have to specify the > location of the shard for the online collection. > > > http://localhost:8983/solr/AllData/select?q=*%3A*&sort=Session_UTCStartTime+desc&wt=json&indent=true&shards=localhost:8984/solr/online,<http://localhost:8983/solr/AllData/select?q=*%3A*&sort=Session_UTCStartTime+desc&wt=json&indent=true&shards=Online_20170605,Offline_20170529>Offline_20170529 > > > > Is this expected behaviour? Or can anyone point out what I’m doing wrong? > > > Many thanks > > Philippa > >