2015-05-02 12:23
浏览 122

Solr - 如何在不通过查询字段的情况下搜索所有字段?

I have tried as below,

<field name="collector" type="text_general" indexed="true" stored="false"  multiValued="true" />

and copy all my fields to copyField as below,

<copyField source="fullname" dest="collector"/>
<copyField source="email" dest="collector"/>
<copyField source="city" dest="collector"/>

and also I have put all copyField tags below



tags. But I cant search in all fields. I have to pass fullname before query like,


I want search by,


And I should search all fields contains Mayur word.

Help me please

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • duanjian7617 2015-05-03 03:44

    make sure the fields have stored=true

    <field name="field_name" type="text_general" indexed="true" stored="true"/>

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

    Use the Default Search Field : The is used by Solr when parsing queries to identify which field name should be searched in queries where an explicit field name has not been used.


    in your schema.xml

    解决 无用
    打赏 举报
  • duanganleng0577 2019-05-30 10:47

    This has been deprecated in solr 7: It's recommended to use df parameter.

    解决 无用
    打赏 举报

相关推荐 更多相似问题