Hi
My taxonomy term pages are provides via panels.
Is it possible to display solr search results on a taxomy term page?
thx
bennos
Hi
My taxonomy term pages are provides via panels.
Is it possible to display solr search results on a taxomy term page?
thx
bennos
Comments
Comment #1
zach harkey commentedI have the same exact question.
Comment #2
zach harkey commentedOk, I figured out how to do this.
1. Make sure to disable "Use ApacheSolr for taxonomy links" (/admin/settings/apachesolr -> Advanced configuration)
2. Enable Panels' Taxonomy term template (/admin/build/pages).
3. Edit your Taxonomy term template panel variant to replace the 'taxonomy_term' pane with the ApacheSolr search results pane (Add content > ApacheSolr Search > ApacheSolr Search results. Use these settings.
4. Add as many additional ApacheSolr panels as you need for facet searching. See screenshot of my configuration.
I'm so happy about this.
Comment #3
ximo commentedThat's a smart use I hadn't thought of. Sounds like you found the best solution too. Thanks for sharing the step-by-step instructions!
Comment #5
auraell commentedI am not seeing "ApacheSolr Search" in the Add Content options. Do you know why this might be? I'm on Drupal 7.
Comment #6
shawn dearmond commented#2 is a creative solution, but it's not exactly right. Simply searching by the text of the taxonomy term title isn't good enough. It needs to list all items marked with that term no matter what. Just like the Solr taxonomy term page does.
Comment #7
shawn dearmond commentedSince it doesn't seem to be possible, let's put this as a Feature Request for 7.x-1.x
Comment #8
acbramley commentedCan you provide more information about exactly what you are trying to achieve and how it is not possible in 7.x currently. Cheers
Comment #9
shawn dearmond commentedThe panels pane that's available from this module is "Solr Search Results". But the only field that's available for input is "Keywords". That's great for the standard search results page. I can put the term name into the keywords, but it just ends up being a keyword search for the taxonomy term name.
However, what I'm using now is the Taxonomy Page provided by the apachesolr module. This hijacks the standard Taxonomy page and turns it into a Solr search result page. The difference here is that it specifically results in only those results which are tagged with that term. (and then lets me do facets and other awesomeness).
Ideally, I would have best of both worlds: A panels layout that I can customize to my heart's content, including the search results pane displaying only those specifically tagged with that term.
If there is some way to do this with the current module, I'd love to hear it because I couldn't figure it out.
Thanks!
Comment #10
acbramley commentedHi @Shawn
Rather than the Keywords override you should use the filters override! This takes arguments in the form of solr__fiekd_key:value
For example if you wanted a search results pane that was filtered by a taxonomy term automatically you would select "Append to" next to filters and add something like the following into the text field:
im_field_my_taxonomy_field:%taxonomy_term:tid
Selecting Append to means that you can use things like Facet API to further filter your pages without overriding this one.
EDIT: You must also make sure that "Use context keywords" is also ticked in the search results pane config.
Comment #11
shawn dearmond commentedThat worked perfect!
Thanks!
Comment #12
Aaron23 commented#2 Configuration page link not working now. Can you provide it?