Closed (duplicate)
Project:
Taxonomy hide
Version:
6.x-1.02
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
15 Jun 2010 at 07:40 UTC
Updated:
8 Sep 2017 at 10:10 UTC
Using Taxonomy Hide, you will notice that these terms are no longer indexed by the Apache SOLR Search Integration module.
Is this desirable behaviour? I'd like to hide terms on teaser and node pages, but not from search indexes.
Should this be a feature?
[x] Hide Terms from HTML Output on Teaser and Node Pages
[ ] Exclude Terms from Search Indexes
Comments
Comment #1
jpmckinney commentedSee #852186: delete index + re-index: taxonomy filters (facets) no longer display, which was marked duplicate of this issue.
Comment #2
adam_b commentedSorry, I think this is a bug so I'm changing the category.
The module description says that terms will not be listed during node view - it says nothing about preventing indexing in other contexts.
I can't be the only person who uses both this module and Apache Solr - can this be fixed?
Comment #3
soghad commentedI believe there is a simple solution to this.
Solr indexes everything returned by a call to node_view($node, FALSE, FALSE), so all this module would have to do is check the $teaser and $page variables, implemented as $arg, and $arg2, respectively in the _taxonomy_hide_nodeapi function.
If both $teaser and $page ($arg and $arg2) are false, the module should not unset the terms. Then, SOLR will pick them up, but they will still be hidden in teaser and page views.
This change should fix everything related to indexing:
Comment #4
mtsanford commentedThe change in #3 did the trick for me. I'm using 6.x-1.2 pache SOLR Search Integration module.
Comment #5
teezee commentedThere's also the $node->build_mode information which contains:
NODE_BUILD_NORMAL (= 0) when node is built in either $page or $teaser mode
NODE_BUILD_SEARCH_INDEX (= 2) when node is built for use in a search index
This information is also implemented by Apache Solr (checked with 6.x-1.2) in apachesolr.index.inc (line 50).
Comment #6
David Lesieur commentedThis problem is being addressed in #308133: Re-implement with hook_link_alter().