Closed (fixed)
Project:
Facet API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Jul 2011 at 11:57 UTC
Updated:
17 Apr 2012 at 12:03 UTC
As illustrated by Search API integration, not all searchers will want the default node facets. They should have the ability to opt out if they want. If all backends decide to opt out, we can remove the default facets when the module goes 1.0.
Comments
Comment #1
cpliakas commentedAdded to the "low hanging fruit" list.
Comment #2
cpliakas commentedSome guidance in case anyone wants to pick this up...
This would involve adding a "include default facets" key (or something similar) to the facetapi_get_searcher_info() function. It would default to TRUE for backwards compatibility.
Then, there would be a conditional added to facetapi_facetapi_facet_info() testing if the "include default facets" key is FALSE. If so, it would not return any facet definitions.
Also up for better ideas on how to approach this.
Comment #3
cpliakas commentedResolved in commit 8db255d.
Comment #5
shenzhuxi commentedLine 524 in facetapi_get_searcher_info set all apachesolr_load_all_environments with default node facets.
'types' => array('node'),
I think the hook hook_facetapi_searcher_info should allow modules define this by themselves. Now I'm working a http://drupal.org/project/apachesolr_user_indexer and can only use hook_facetapi_searcher_info_alter to add 'user' in 'types'.