Closed (fixed)
Project:
Facet API
Version:
7.x-1.0-rc4
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Aug 2011 at 04:43 UTC
Updated:
18 Jun 2012 at 02:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
cpliakas commentedIt's important to note that Facet API integration isn't in the Search API module yet. I want to confirm that you are testing the integration via the Search API Facet API Integration code.
Thanks,
Chris
Comment #2
cpliakas commentedClosing after weeks of inactivity.
Comment #3
a_lawry commentedHi Chris,
I noticed this also. Example here:
http://bigtravel.sunbear.com.au/tour-search/hiking
The countries vocabulary has a hierarchy it is divided into regions so it looks something like this:
= Europe
- Germany
- France
- Italy
= South America
- Brazil
- Peru
I was expecting it to display as a hierarchy in the facet block. I'm 99% sure it was working correctly when I was using the apache solr module with facet API. Now I've switched over to Search API and Facet API (Still with apache solr backend) I'm just getting the flat list.
What is the expected behaviour?
Comment #4
cpliakas commentedThe expected behavior is to display them if a hierarchical fashion if a) you are using a version of Search API that supports hierarchical indexing of taxonomy terms and b) Facet API is configured to display that facet as hierarchical. The Facet API hierarchy processing is definitely working, the trick is making sure that your configurations are correct and that your version of Search API supports hierarchical indexing of taxonomy terms.
Comment #5
a_lawry commentedThanks Chris. Found it here:
"Oh, and you'll need to activate the "Index hierarchy" data alteration and tell it to also index the parent terms for the field in question."
#1258740: Taxonomy hierarchy as facet
Comment #6
cpliakas commentedGood find. So I would recommend installing the latest version of Search API, reindex your content, and seeing if that clears up the issue.
Thanks for posting back,
Chris
Comment #7
miiimoooThere's a bug somewhere with hierarchies. Not sure we have exactly the same one. Have a look a the two screenshots. The term "Art 10.1 (d)" (4) keeps popping up though it's in the "Qualification Directive" hierarchy. Not sure how to reproduce this but let me know if there's anything else you want to know.
EDIT: I've dug a bit deeper into facetapi. What seems to be the problem is this:
$build contains tids. If $build doesn't contain the parent of a term then the term becomes an orphan.
So, for instance, when you have a term with depth 3 then it will move to the top level if its parent with depth 2 isn't selected.
Comment #8
cpliakas commentedOK, interesting. So which backend module are you using (Apache Solr Search Integration or Search API)?. If you are using Search API, are you indexing the parents along with the children? For example, if you have a "food" -> "fruit" -> "apple" hierarchy then selecting "apple" will also index the content as being tagged with "fruit" and "food"?
Comment #9
miiimoooWe're using Search API, Index hierarchy is enabled and the field is selected. Not sure where to look in SOLR to figure out what it indexes
Comment #10
miiimoooThis driving me a bit insane. In search_api_facetapi I get this item before indexing (and using the hierarchy alteration)
And when I do a search that brings up item with nid 177 I get this:
To explain - 119 which is the parent of 103 has disappeared. Maybe it's a bug in search_api (_solr)?
Comment #11
miiimoooI've figured this one out. The problem lies in the facet.limit field. This limits the total number of (in my case) term ids that will be returned per facet. I had set this to 10 and since this is a big hierarchical taxonomy a result can have more than 10 tids (including parents). Changing the facet.limit to 100 in facet display / global settings / hard limit fixes the problem. It's conceivable that bigger hierarchical taxonomies will hit the 100 limit though
Comment #12
miiimoooComment #13
cpliakas commentedThanks for posting back!
Comment #15
egarias commentedI do have this issue.
no children nodes are shown.
I checked $this->facet['hierarchy callback'] is not settled.
This is my path: http://solomoto.es/taxonomy/term/1/seccion/competici%C3%B3n-5
The term I want to show hierarchy is vocabulary->seccion term->competici%C3%B3n tid->5
maybe there's an error and the facet api considers taxonomy/term/1 as the term to check hierarchy?, the path in the $build object is allways #path=taxonomy/term/1
any help?
Thanks
Comment #16
egarias commentedSorry, I do reopen for help
Comment #17
cpliakas commentedegarias,
You have two threads going on here. Let's keep this one fixed as there was a problem that was solved, as introducing a new topic half way through will cause confusion to others trying to read it through. Let's continue discussing at #1641886: Taxonomy parent doesn't show children nodes where you can post the answer to my question in addition to what didn't work for you in this thread.
Thanks,
Chris