使用PHP PECL查询Apache Solr中的字段


Querying fields in Apache Solr with PHP PECL

我正在尝试用PHP PECL查询Solr中的特定字段。

目前我正在使用setQuery函数,但这没有让我将查询设置为特定的字段。

谢谢凯文

我认为你必须使用"edismax"解析器,试试这个:

$solrCriteria->setQuery(<your keyword here>);
$solrCriteria->setParam('defType','edismax');
$solrCriteria->setParam('qf','<first field here> <second field here> ...');