且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Solr AND运算符不起作用

更新时间:2023-11-13 16:13:10

如果您在查询中使用字段化数据并且未使用双引号(),则在该字段中搜索的唯一单词是第一个单词.例如,在您的第一个请求中,它将在文本"字段中查找关键字30MM,并在默认字段中查找其余关键字.

If you use fielded data in your query and you don't use double quotes ("), the only word being searched in that field is the first one. For example, in your first request, it looks for the keyword 30MM in the "text" field, and for the rest of the keywords in the default field.

在您的示例中,我认为如果您按以下方式进行查询应该可以:

In your example, I think that if you make the query as follows should work:

http://localhost:8080/products/select?indent=on&q=textfields:"30MM X 533MM Abrasives" AND text:"30MM X 533MM Abrasives"&fl=*,[docid]