Trying to adapt "project_solr module for D6" and needing some help

geraud's picture

I have this params array:

$params = array(
'fl' => 'id,nid,title,body,format,comment_count,type,created,changed,score,url,uid,name,sis_project_release_usage,ds_project_latest_release,ds_project_latest_activity',
'rows' => variable_get('apachesolr_rows', 10),
'facet' => 'true',
'facet.mincount' => 1,
'facet.sort' => 'true',
'facet.field' => array(
'im_vid_'. _project_get_vid(),
'im_project_release_api_tids',
),
'facet.limit' => 200,
'sort' => $query->solrsort,
);

and I would like to adapt the facet.field sub array to match vocabs of my website.
If I understand correctly, I have to indicate field names like "im_vid_n" where n is the vid of the vocab.
Is it a generic field name construction for all the vocabularies we want to include in the faceted search or shall declare these fields somewhere else for solr to be aware of them ?
But then I don't understand the "im_project_release_api_tids" field.
Can I declare here whatever "foo_bar" field I want ? Should I declare it somewher else ( in project_solr_apachesolr_update_index(&$document, $node) for example) ?

Any help or documentation would be appreciated.

Login to post comments

im_project_release_api_tids

Damien Tournoud's picture
Damien Tournoud - Mon, 2009-09-28 14:06

im_project_release_api_tids is a specific field added to the solr document by project_solr_apachesolr_update_index().

Damien Tournoud
http://drupalfr.org