Hi

Is there a REST API in Solr that allows me to query a certain Replica/core?
I am writing some custom replica-recovery code and I'd like to verify that
it works well.

I wanted to use the /collection/select API, passing
shards=host.under.test:ip/solr/collection, but that also works even if
'host.under.test' does not hold any local replicas. This makes sense from a
distributed search perspective, but doesn't help me. Also, passing
distrib=false, which I found by searching the web, didn't help and seems to
be ignored, or at least there's still a fallback that makes
'host.under.test' access the other nodes in the cluster to fulfill the
request.

Next I looked at /admin/cores?action=STATUS API. This looks better as it
allows me to list the cores on 'host.under.test' and I can get index-wide
statistics such as numDocs and maxDoc. This is better cause in my tests I
know how many documents I should expect.

But I was wondering if

(1) Is Core admin API the proper way to achieve what I want, or is there a
better way?
(2) Is there core-specific API for select/get, like there is for
/collection. I tried /core.name/select, but again, I received results even
when querying the node w/ no local replicas.

Shai

Reply via email to