It would seem that private nodes still show up in search results, could add a feature that removes private nodes from being indexed by the search module?
It would seem that private nodes still show up in search results, could add a feature that removes private nodes from being indexed by the search module?
Comments
Comment #1
bomarmonk commentedI can confirm. Can this be fixed ASAP? Marking as critical, as they aren't really private if someone can pull them up in a search.
Comment #2
carvalhar commentedwell....how does can be possible to edit this module node access rules to avoid private nodes to show in search?
Comment #3
axyjo commentedhook_update_index() might work?
Comment #4
bdhowell commentedWhat about simply calling
search_touch_node($nid)for the node whose privacy setting was just changed? It causes the revision timestamp of the specified node to be set to the current time, which will result in the node then being reindexed by Drupal.http://api.drupal.org/api/function/search_touch_node/6
Comment #5
bdhowell commentedCalling
hook_update_index()could be very expensive, and is certainly overkill for the sake of only one node.Comment #6
bdhowell commentedI believe the fixes are as follows: (note last line of each function)
I'll create a patch if this tests successfully.
Comment #7
dboulet commented@bdhowell, I'm not understanding how your code fulfills our needs. From what I can see, it will only cause the node to be re-indexed, while what we want is for the node to not be indexed at all.
Comment #8
simon georges commentedHi,
I was just wondering... It's true that we don't want the node to appear in search results for other people, but we still want it in our own search results, don't we ?
So I think it's more complicated than just removing the node from the index, or something like that. Anyway, maybe removing it from the index is the easier way to achieve such a functionnality.
My 2 cents,
Comment #9
sjeandroz commentedis it not simpler to check before display the node in the search result if the current user has permission to access the node?
Comment #10
adamps commentedClosing ancient D6 issue that doesn't seem to apply any more.
In D7 search should take account of node access rules.