Question

I am using SOLR 1.3.0 for performing a distributed search over already existing lucene indices. The question is, is there any way in which I could find from which shard did a result come up after the search?

P.S : I am using the REST api.

Was it helpful?

Solution

For Solr sharding -

Documents must have a unique key and the unique key must be stored (stored="true" in schema.xml)

I think the logic should be already there on your side, by which you are feeding the data to the shards, as the ids need to be unique.
e.g. the simplest is the odd even combination, but you may have some complex ones by which you distribute the data into the shards.

OTHER TIPS

You may be able to get some information using debugQuery=on, but if this is something that you'll query often I'd add a specific stored field for the shard name.

PS: Solr doesn't have a REST API.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top