Reputation: 31
I looked over many similar questions. The answer is copy all fields to a field and set that to default field. However, it is still not working.
Some of my fields:
<field name="Unit" type="string" docValues="true" indexed="true" stored="true"/>
<field name="Amount" type="pdoubles" docValues="true" indexed="true" stored="true"/>
<field name="Comment" type="text_general" docValues="true" indexed="true" stored="true"/>
I add:
<field name="searchall" type="text_general" multiValued="true" indexed="true" stored="true"/>
(I also tried stored="false" but none of them works) and add all copyfields I need under in managed-schema through schema API.
Then I changed
<initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">
<lst name="defaults">
<str name="df">searchall</str>
</lst>
</initParams>
in solrconfig.xml
It still gives nothing when I search q=something. Anyone know where I did wrong?
Upvotes: 1
Views: 425
Reputation: 31
As MatsLindh mentions in the comments, don't forget to reindex.
Add your copyfields - and does it work if you explicitly reference the field instead of using
df
? Have you reindexed after changing the configuration? If you haven't reindexed after adding the copyField instructions, then nothing will be in the destination field. The copy operation happens when the document is being indexed.
I reimport data and it works.
Upvotes: 1