I cannot see the option "configure dependencies" when configuring my facets. I can see "configure display" and "configure filters".

Facet API seems to work fine with Search API Solr search as mentioned here:
http://drupal.org/node/1337292

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

becw’s picture

Hmm, I wonder if it's just a missing UI element or whether it's not supported at all.

marc.mantha@outlook.com’s picture

Issue summary: View changes

Has anyone found a solution for this?
I also have this problem. I am using 7.x-1.9.
In my solr shema, I have date fields and long fields.
Facets based on the date fields have the "Configure dependencies" contextual links, but I don't see the link for facets of long fields.
Here is what I tried:

- Changing my field types from long to integer, refreshed the sarnia properties,
- Changing fields types via hook_search_api_index_load, hook_entity_property_info_alter and hook_entity_load
- Set Query Type to term.

The only difference I see between date types and long types for the facet is the query. Date don't have a Query Type settings. Long or Integer do have Query Type set to sarnia_term. I suspect that this is related to the build function in the SarniaFacetapiTerm class.

Any help with this would be greatly appreciated.

jmdeleon’s picture

I added the default Facet API plugins into the build array that generates the facets within Sarnia with the attached patch. Give this a try.

jmdeleon’s picture

The following patch attached to this message may be a bit more useful: If the Facet API Bonus module is included and active, the dependency "Another facet" is made available.

marc.mantha@outlook.com’s picture

#4 works like a charm. Thank you very much. I had managed to make it work by creating a "Facet dependency" visibility rules and adding the facets in panels but I had to remove the querystring params for hidden facets via url_inbound_alter() which was a pain.

  • jmdeleon committed e2b9757 on 7.x-1.x
    Issue #1645256 by jmdeleon: Facet API dependencies not working
    
jmdeleon’s picture

Status: Active » Fixed
jmdeleon’s picture

Status: Fixed » Closed (fixed)
mr_scumbag’s picture

This change committed in Sarnia-7.x-1.10 From patch #4

@@ -1161,7 +1161,7
-          'dependency plugins' => array(),
+          'dependency plugins' => array('bundle', 'role', 'facet'),

gives the error
PHP Fatal error: Class name must be a valid object or a string in /Applications/mappstack-5.6.16-/apache2/htdocs/biokdf/sites/all/modules/contrib/facetapi/plugins/facetapi/adapter.inc on line 870

As it cycles though the 'bundle', 'role', 'facet' (it blows up on 'facet') and breaks all my Sarnia views.

It does work only if you have facetapi_bonus installed. I tested this out.
Simply downloading facetapi_bonus and turning it on makes it all fine.
I assume everyone (but me) was using this module, but it shouldn't be required - else it needs to be a dependancy.

jmdeleon’s picture

It probably was not a wise assumption to make that the Facet API Bonus module would be active. I also thought that the default dependency on another bundle was not very useful, and that the dependency on another facet (which facetapi_bonus provides) would be.

Here is another patch testing for whether or not facetapi_bonus is activated.

jmdeleon’s picture

Status: Closed (fixed) » Needs review

  • jmdeleon committed e726efd on 7.x-1.x
    Issue #1645256 (#10) by jmdeleon: Facet API dependencies not working
    
jmdeleon’s picture

Status: Needs review » Fixed
jmdeleon’s picture

Status: Fixed » Closed (fixed)