Since rc1, it is possible to optionally "hijack" taxonomy pages and do a faceted search with the according taxonomy term instead.
However, in our case, we use faceted search only for two *highly structured* content types (the bulk of our content, many thousand nodes) - we exclude all other content types such as blog posts, etc.
I.e., we exclude these other (less or unstructured) content types from the solr search index in the 'content bias settings'.
We would love to hijack taxonomy pages for the taxonomy vocabularies associated with the solr-searchable content types.
It would be great if the "hijack taxonomy pages" option would automatically only select taxonomies which are actually indexed by solr (as per 'content bias settings').
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 533044-D6.patch | 1.11 KB | jpmckinney |
| #9 | apachesolr-533044-9.patch | 1.3 KB | janusman |
Comments
Comment #1
robertdouglass commentedAgree.
Comment #2
janusman commentedHmm, in fact it should only hijack terms for vocabularies that are indexed AND were specified as available filters for Apache Solr in admin/settings/apachesolr/enabled-filters ...
Now, if you're sharing a vocabulary that has been enabled as a filter across several content types, and one of those content types is being excluded from the Solr index then yes, you will not get those nodes back when you visit the hijacked taxonomy/term/XX page... are you saying this is what's happening?
Comment #3
pips1 commentedClicking on a taxonomy term should give you a list of *all* content that has been tagged with the term, regardless whether its in the Solr index or not, IMHO.
For the case you describe in #2, I'd say "hijacking" for that vocabulary should be automatically disabled / disallowed, in favour of the standard taxonomy term listing.
In other words, hijacking should only apply to taxonomy vocabularies that
Makes sense?
Comment #4
janusman commentedGot it =)
Although, it's really the admin's call to decide whether any of this happens or not... =)
We just need to make a decision (I tend to agree with your #3)
The task now becomes how to make this obvious to the admin... perhaps a message under admin/settings/apachesolr/settings > "Use Apache Solr for taxonomy links" ... perhaps also sprinkle some help messages on other forms like in admin/content/taxonomy/add/vocabulary for instance? @Robert added some contextual help that can be switched off by the admin, these could go there.
As for the actual patch, I'm swamped for now, so it's up for grabs.
Comment #5
pwolanin commentedI think there is a misunderstanding here - all the taxonomy terms are indexed afaik - the bias page only selects which ones to search or regard as important.
Comment #6
janusman commented@pwolanin: In hopes of making the issue clearer... changed the issue title, and here's an explanation:
Try this:
* create 2 content types: "story" and "page"
* Create a taxonomy vocabulary, applicable to both. Say "Fruit" with the term "Apple" (let's say that term has tid = 1)
* Label one node in each content type as "Apple"
* Tell apachesolr to only index "story"-type content
* Tell apachesolr to hijack taxonomy pages.
* Index all the site's content.
* Visit taxonomy/term/1 ("Apple").
The problem is: you only get the result for story nodes labelled "Apple" but not for the page-type tagged "Apple".
@Pips in #3 is (I think) referring to content (and not terms) in the index:
So, he proposes that the taxonomy hijack function check whether the hijacking that term's page would cause ANY exclusion of content, and if so, do not hijack.
@pips, @robertDouglass: Hope I understood correctly =)
Comment #7
pips1 commented@janusman: You describe well what I meant!
Comment #8
pwolanin commented@jnusman - ok, yes that makes it clea why there is a problem, but it's not clear if apachesolr should catch it or if the admin should catch it.
Comment #9
janusman commentedThat makes two of us. I thought the admin *should* catch it.
Perhaps we just need to add a line of documentation to the UI, like so?
(Patch for 2.x)
Comment #10
janusman commentedBah, forgot to set as needs review.
Comment #11
janusman commentedTagging
Comment #12
jpmckinney commentedI'm in favor of ripping this out into contrib/, as it has nothing to do with the core functionality of the module. I think the warning in #9 is preferable to #3, as #3 will lead to inconsistent UI between different taxonomy pages.
Comment #13
jpmckinney commentedAdd tag.
Comment #14
jpmckinney commentedI think the best we can do is have better documentation per #9. You hijack, or you don't hijack. If you want fancy-hijack, you need to write some code, because there are mutually exclusive ways of being fancy.
Fixed in 6.1 and 6.2. 7.x not affected.