How to search whole solr index?

前端 未结 1 1502
误落风尘
误落风尘 2020-12-20 09:39

I import data from database directly into the solr index. Now I want to search it using php-solr-client. Now I want to search it:

$offset = 0;
$limit = 10;

         


        
相关标签:
1条回答
  • 2020-12-20 09:44

    If you omit the details:, doesn't it search all fields that are indexed?

    Otherwise, you can always combine multiple fields in one query like this:

    details:Server OR field2:Server OR field3:Server

    EDIT: Regarding default field to search, specify a "dummy" field that would be populated with multiple values:

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

    Then have copyField entries for all fields that would be searched:

    <copyField source="title" dest="text"/>
    <copyField source="akatitle" dest="text"/>
    <copyField source="year" dest="text"/>
    

    And finally, specify that this field should be the default one:

    <defaultSearchField>text</defaultSearchField>
    

    That should work.

    0 讨论(0)
提交回复
热议问题