Now apachesolr search works only in content. It also have to work on other fields for eg: on typing "test", It searches only in content.
My requirement is to search on description,label also (which i have already indexed).
content:abcd OR description:sample_upload_document
Using apachesolr.api.php,I tried hook_apachesolr_query_prepare($query)
function MYMODULE_apachesolr_query_prepare(DrupalSolrQueryInterface $query) {
$query->addParam('qf','content description');
watchdog('solr result',print_r($query,true));
}
refering to the sitehttp://knackforge.com/blog/selvam/drupal-7-filtering-solr-results
.
After performing that, i found description is added to
SolrBaseQuery Object
(
[params:protected] => Array
(
[qf] => Array
(
[0] => content^40
[1] => description
)
But still when i give the value for description, search results would not yield any value.
Am i correct in a way? why doesnt it return the result?
How to do that? default search,searches the given text only in content.How to make it to search on other fields like description,label?