Greenhorn
Greenhorn

Reputation: 1821

Distributed search in SOLR

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.

Upvotes: 0

Views: 257

Answers (2)

Jayendra
Jayendra

Reputation: 52809

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.

Upvotes: 1

Mauricio Scheffer
Mauricio Scheffer

Reputation: 99750

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.

Upvotes: 1

Related Questions