I tried it but shards.info returned all shard information of all collections in the alias, not just where the document came from. I still don’t know which collection the response docs came from.
Sent from Mail for Windows 10 From: Jan Høydahl Sent: 11 June 2021 12:44 To: [email protected] Subject: Re: Return name of the collection/core with the document Try to add shards.info=true to your request, and you should get the core name in the response.. Jan > 10. jun. 2021 kl. 23:55 skrev ufuk yılmaz <[email protected]>: > > Is it possible to return which collection a matching document came from, when > querying against an alias? > > Suppose alias “myAlias” is pointing to collections c1, c2 and c3 and we are > querying: > > /solr/myAlias?q=id:123 > > I’m trying to get a response similar to: > > [{ “id”: 123, “collection”: “c2”}] > > Core name, shard name would be useful too, since I can extract collection > name from them. > > Is this achievable? > > Thanks > ~ufuk > > Sent from Mail for Windows 10 >
