My current design:

All clients data in a 2 shard 2 replica each 2 node solr cluster.

The data contains records with both clientid having value and clientid=null
(the clientid=null is used for search across all clients)

When searching I use fq: clientid = null or clientid =
searchParameterClientId

But now there appears to be a need to collapse on a certain field so I am
considering using the Collapsing feature for which I will need to index all
documents for client in a single shard.

I am thinking of using document routing by using the following unique key:
clientid!uniqueid

This should index all documents in a single shard. And then I could use
_router_ in my search and use Collpasing. But I am not sure how to deal
with records where clientid=null i.e. I want to be still able to search
across clientid=null and clientid=searchParameterClientId.

Any thoughts on how I can handle this?

Thanks,

Reply via email to