Solr search query over multiple fields

前端 未结 4 2124
猫巷女王i
猫巷女王i 2020-12-14 00:30

Is it possible to search in Solr over two fields using two different words and get back only those results which contain both of them?

For example, if I have fields

4条回答
  •  心在旅途
    2020-12-14 01:00

    You can use boolean operators and search on individual fields.

    q=type:furniture AND location:office
    

    If the values are fixed, it is better to use Filter Queries for Performance.

    fq=type:furniture AND location:office
    

提交回复
热议问题