How to filter solr result with multiple parameter. I am using Zend_Service_Solr class for my solr search extension.
开发者_如何转开发I can query all result by
$searchQuery[] = '*:*';
$solr->search(($searchQuery), $startRow, $limit, array());
Now I would like to filter with multiple filter parameters like name, city, zipcode at a time
Tried as,
$searchQuery[] = 'zip_code:'.$zip_code;
$searchQuery[] = 'city:'.$city;
$searchQuery[] = 'name:'.$name;
$solr->search($searchQuery, $startRow, $limit, array());
but fails. Any idea how to get the desired output
try:
$searchQuery->addFilterQuery('zip_code:'.$zip_code);
$searchQuery->addFilterQuery('city:'.$city);
$searchQuery->addFilterQuery('name:'.$name);
精彩评论