solr 查询query

一、通过特定字段查询
http://localhost:8983/solr/select?q=author:rafal

使用edismax分析器
1、http://localhost:8983/solr/select?q=author:rafal&defType=edismax

在同一领域多个值查询
2、http://localhost:8983/solr/select?q=author:(solr cookbook)

查询结果字段排序
sort=author+asc,score+desc
http://localhost:8983/solr/select?q=solr&sort=author+asc,score+desc

选择查询分析器
添加这个到查询defType=dismax
http://localhost:8983/solr/select?q=book&qf=title&defType=dismax


如何搜索一个短语,不是一个单一的字

字与字之间的距离定义短语
http://localhost:8983/solr/select?q=title:"2010 report"~1

逻辑 OR AND

Solr 学习(5) —- Solr查询语法和参数




猜你喜欢

转载自leiwuluan.iteye.com/blog/1537673