solr - set fileds as default search field

前端 未结 1 1373
死守一世寂寞
死守一世寂寞 2021-01-14 09:20

The following query works well for me

http://[]:8983/solr/vault/select?q=VersionComments%3AWhite

returns all the documents where version

1条回答
  •  深忆病人
    2021-01-14 09:59

    As far as I know you should only have the declared once in your requestHandler

    Typically what I do is copy all the fields that i want to search into a default search field called text.

    schema.xml:

    
    

    solrconfig.xml

    
    
    
       *:*
       explicit
       10
       text
    
    
    

    If this is not good enough, you can always search other fields using a dismax search with the qf declaration like so:

    http://localhost:8983/solr/vault/select/?q= White&defType=dismax&qf=PackageName+Tag+VersionComments+VersionTag+Description+SKU+SKUDesc

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