0

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?

Abhijit Bashetti
  • 8,518
  • 7
  • 35
  • 47
blond1995
  • 27
  • 4
  • check this http://stackoverflow.com/questions/30002255/solr-how-to-search-in-all-fields-without-passing-query-field/30010009#30010009 – Abhijit Bashetti May 08 '15 at 10:32
  • No, unfortunately, `stored="true"` didn't help me. As for this link: my issue exactly vice versa. No I can search like `q=ge` but it search in the default_search field. And I want to create my multivalued field `text_qs` and search in this field `q=text_qs:ge` – blond1995 May 08 '15 at 10:52

2 Answers2

0

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.

Abhijit Bashetti
  • 8,518
  • 7
  • 35
  • 47
0

Sorry for confusing. As it turned out, the issue was in the indexing. The script which perform indexing don't useful for this situation, I had to use another script. Thanks for help!

blond1995
  • 27
  • 4