searchsolrsolr-schema

Can not search in the field which I defined in schema.xml like copyField


I've added to the schema.xml the multivalued field in the following way:

<field name="text_qs" type="text" indexed="true" stored="false" multiValued="true"/>

And added two fields to it:

<copyField source="name" dest="text_qs"/>
<copyField source="symbol" dest="text_qs"/>

After that I perform indexing of the solr, restart it, but still I can not search in this field text_qs. I checked it by search text_qs:ge in the solr admin http://localhost:8061/solr/admin/.

Could you please ask somebody why?

In general, I tried to create search in the certain fields. Because now we can search in the field text_def, which is <defaultSearchField>text_def</defaultSearchField>. And this field text_def was defined in the similar way like:

<field name="text_def" type="text" indexed="true" stored="false" multiValued="true"/>

It just has nor copyFields:

<copyField source="name" dest="text_def"/>
<copyField source="symbol" dest="text_def"/>
<copyField source="numb" dest="text_def"/>
....

So now when we type 'ge' we search this 'ge' in the default search field text_def, and we search in fields 'name', 'symbol', 'numb',.... But we want search only in 'name' and 'symbol'. And that's why I try to create the field text_qs.

Does this correct?


Solution

  • try with change stored=true

    <field name="text_qs" type="text" indexed="true" stored="true" multiValued="true"/>
    

    True if the value of the field should be retrievable during a search.