Querying fields in Apache Solr with PHP PECL

732 Views Asked by At

I am trying to query a specific field in Solr with PHP PECL.

Currently I am using the setQuery function, but this does not let me set the query to a specific field.

Thanks Kevin

1

There are 1 best solutions below

0
On

I think you have to use "edismax" parser, try this:

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