user1050619
user1050619

Reputation: 20856

Solr database with multiple schema

My solr db has multiple schema as below,

***Part of Schema 1***
<field1>
<field2>
<field3>
<field4>
<field5>

***Part of Schema 2***
<field6>
<field7>
<field8>

When I do a q = *:*, I get <field6>,<field7> and <field8> but not the remaining fields.. I am able to select fields 1-5 only when field1:'value' in the q object.

Is there a way to know that 6-8 is part of schema-2 and 1-5 is part of schema-1

Upvotes: 0

Views: 88

Answers (1)

The Bndr
The Bndr

Reputation: 13394

Depending on your search handler (like (e)DISMAX) you can define the default search fields. Or you can use the qf= Parameter to define the fields, you like to search in: http://wiki.apache.org/solr/ExtendedDisMax#qf_.28Query_Fields.29

If you like to separate your DB schema in solr, so that fields from schema-1 does not know the fields from schema-2, you can use 2 different solr cores: one for each schema.

Is there a way to know that 6-8 is part of schema-2 and 1-5 is part of schema-1

As far as i know, Solr does not support DB schemas. A field insight solr is a field. There is no way to add additional (meta) informations, where this field is coming from. So you will not be able to filter your queries depending on there origin - except by defining the Query fields or by separating schemas in cores or something like that.

Upvotes: 1

Related Questions