There is an unconfirmed report stemming from the comment at http://drupal.org/node/1361284#comment-5384568 that every facet's "field api name" key is set to FALSE even if the facet is indexing field data. It looks like the search_api_facetapi_facetapi_facet_info() function is attempting to set the field api key, not sure why it isn't taking. It would be much appreciated if people who are experiencing this issue could confirm and debug the code snippet illustrated pointed to in the link.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cpliakas’s picture

Status: Active » Postponed (maintainer needs more info)
FileSize
115.53 KB

Tried to replicate the bug and I couldn't. The attached screenshot shows how the field api key is being populated correctly.

mrfelton’s picture

Status: Postponed (maintainer needs more info) » Active
FileSize
1.81 KB

I'm not 100% in the implementation as I'm pretty new to Entity API and Search API and Facet API, but I think this patch addresses the problem.

mrfelton’s picture

Status: Active » Needs review
mrfelton’s picture

@cpliakas It may be because the fields that I'm indexing are through a relationship? Ie, I'm indexing a taxonomy terms reference field attached to a commerce product entity, referenced through a product reference field on commerce product display node!

cpliakas’s picture

Ahh, that's quite a chain! That's probably where the discrepancy lies.

drunken monkey’s picture

Does this still bug you?
Hm, I guess the clever thing to do would have been to first ask that and only then work on the issue … Damn.

Your code was slightly off, but a good start, thanks. However, what are you using this for – to get the additional facet dependency? Does this really work as expected with just your modification?
I would have thought that having the field on a different entity than the result would screw things up too much to be still useful, which is probably why I only determined the Field API field question for properties directly on the result entities. However, if having other fields also recognized really helps, I guess I'd also be willing to commit this.

legolasbo’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

This issue has not seen activity in over 2,5 years. I am therefore closing this issue to clean up the issue queue. Feel free to re-open and update this issue if you feel this issue is still relevant and of importance.