Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#6 | 1377734-facetapi-set-field-api-name-6.patch | 1.35 KB | drunken monkey |
#2 | 1377734.1-search_api_facetapi-set-field-api-name.patch | 1.81 KB | mrfelton |
#1 | search_api-1377734-1.jpg | 115.53 KB | cpliakas |
Comments
Comment #1
cpliakas CreditAttribution: cpliakas commentedTried to replicate the bug and I couldn't. The attached screenshot shows how the
field api key
is being populated correctly.Comment #2
mrfelton CreditAttribution: mrfelton commentedI'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.
Comment #3
mrfelton CreditAttribution: mrfelton commentedComment #4
mrfelton CreditAttribution: mrfelton commented@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!
Comment #5
cpliakas CreditAttribution: cpliakas commentedAhh, that's quite a chain! That's probably where the discrepancy lies.
Comment #6
drunken monkeyDoes 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.
Comment #7
legolasboThis 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.