Closed (fixed)
Project:
Apache Solr Search
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
5 Mar 2008 at 19:17 UTC
Updated:
7 Dec 2014 at 17:37 UTC
Jump to comment: Most recent file
Comments
Comment #1
janusman commentedThis patch for apachesolr.module puts the all the terms ancestors in the index; this means that searching for "Fruit" will bring up nodes tagged "apple" OR "golden delicious" (as per the above example). However, the display for Filtering by that facet is still flat.
Comment #2
robertdouglass commentedThanks! Will review as soon as I can.
Comment #3
janusman commentedSorry, did not mark as "patch needs review"! Probably got lost among other issues.
By the way I have a strategy for having complete hierarcical support: build an in-memory data structure for building facet blocks, instead of building HTML as we go. This way we can relate hierarchical terms when building the data structure and later let another function handle theming. The theming function would handle cases like hierarchical facets... the case for flat vocabularies might look a lot (in code) like the current functions.
Any pointers to existing code or Drupal functions that do this are appreciated...
Comment #4
robertdouglass commentedjanusman - I'm waivering on marking this "critical" for 1.0 roadmap. What do you think?
Comment #5
janusman commentedHmm I think it's a bug not to find stuff that *is* there (search for "fruit" should bring nodes labeled "fruit > apple" and "fruit > orange")... so I still vouch for the 1.0 release at least indexing the terms, and if possible also adding some theming function to explicitly show the user the hierarchical relationships in the facet's block.
Comment #6
robertdouglass commentedOk. I'm easy to convince (sometimes =)
Can you please confirm that the patch still applies and is ready for review? And perhaps work on a D6 patch too?
Comment #7
robertdouglass commentedHere's a D5 patch that I feel pretty comfortable with. Thoughts?
Comment #8
robertdouglass commentedHad forgotten to save latest version... more code comments.
Comment #9
janusman commentedUhm, testing the patch I just figured out that we realy need to add tids, vids, imfield_vid*s and taxonomy_names for parent AND children. If we don't then a search for term id for "fruit" will show facets for the children (e.g.: apples, oranges) but not for the parent term.
taxonomy_get_parents_all() returns the current term info as well as its parent's.
New patch below for D5.
Also, a screenshot; this was for a search for term "Science" in a test library catalog. To me this seems the correct behaviour (although In the near future I see the display as showing relationships instead of the current flat listing) Live example here:
http://prod68ws.ruv.itesm.mx/dev/5/search/apachesolr_search/+tid%3A184
Comment #10
robertdouglass commentedCommitted to DRUPAL-5 and DRUPAL-6--1. Thanks!
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.