【发布时间】:2011-07-26 11:32:02
【问题描述】:
我正在尝试在 solr 中使用 facet,我想在我的数据库中进行搜索,我需要获取属于特定日期和特定出版商的文章。
我在浏览器上使用了这个网址: localhost:8888/solr//collection1/select/?q=:&version=2.2&start=0&rows=10&indent=on&facet=true&fq=publisher_name:"Saudi Press Agency (SPA)"&fq=datecreated:20110725
而且效果很好。我在我的 php 代码中的 apache_solr_service 类中使用 (search()) 函数。我将数组设置如下:
array('facet'=>'true','fq'=>"datecreated:".$date,'fq'=>"publisher_name:\"".$publisher.'"')我知道因为 fq 索引它不会给我预期的结果,它会将 fq 的值覆盖到 publisher_name 中
但是我怎样才能用两个方面查询来设置这个查询
【问题讨论】: