Closed (fixed)
Project:
Drupal core
Component:
node.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Jul 2005 at 15:08 UTC
Updated:
7 Oct 2005 at 06:40 UTC
Jump to comment: Most recent file
During search indexing, the node.module invokes node_view and node view api before indexing it for content (see node_update_index). This, however, doesn't happen on node_search, which assumes that the body exists to get a snippet from. This causes an empty snippet on flexinode nodes, or anything else that requires a node view api. This patch simply adds the same block from node_update_index to node_search.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | _p_26458_nodesearch.patch | 996 bytes | morbus iff |
| _p_nodesearch.patch | 1010 bytes | morbus iff |
Comments
Comment #1
morbus iffUpdated for HEAD.
Comment #2
chx commentedThe patch applies, does what is described and it is needed. +1
Comment #3
Bèr Kessels commentedJust a thought: node_view can be extremely dynamic. so the search index might get overrun with odd or even non-existing entries.
Also: potentially, a node_view can return entries based on the role/permission. parts of a body can be hidden away for certain users. This patch will break that behaviour too.
I beleive that the search system needs some renewed thought, to overcome such issues.
Comment #4
Steven commentedber: the search system fetches snippets from whatever the current user is seeing. No hidden data will be displayed.
I committed it because it is required for flexinode, but ideally we should have a function to retrieve the processed node body/teaser in one go. It would replace similar code in node_update_index() and node_view().
Oh and the patch was buggy. It did not remove a now-obsolete call to check_output() lower in node_search.
Comment #5
(not verified) commentedComment #6
trigear@drupal.trigearproductions.com commentedComment #7
(not verified) commentedComment #8
(not verified) commentedComment #9
(not verified) commented