QueryQuasar
QueryQuasar

Reputation: 171

Is it possible to query on Solr Alias with different schema collections?

I am using SolrCloud, version 8.1.1 and I have an Alias under which there are several collections, but not all of them have the same xml schema. So I have collection "a" which has the field "is_a" and collection b which does not have this field. Is it possible to make a query that provides a check on the "is_a" field only for the documents in collection "a"? If I perform the query on the Alias, I get the error: Undefined field: is_a

Upvotes: 0

Views: 315

Answers (1)

Abhijit Bashetti
Abhijit Bashetti

Reputation: 8658

The error is expected as the field name is not available in another collection.

In short you cannot perform the same query on alias until and unless you have common schema defined or you need to have the name common searchable fields in he schema which is applicable/available in all the collection.

Another alternative could be create a copy field which will hold the common searchable fields. And while using alias you can search on that copy field which is holding all the searchable field required for your application.

Upvotes: 2

Related Questions