I tried this module to index new nodes I'm importing using Feeds. Unfortunately, it doesn't work. Nodes aren't indexed. Although they do when I manually create or update them.

CommentFileSizeAuthor
#2 instant_search.patch1.42 KBakamaus

Comments

akamaus’s picture

Status: Active » Needs work

I looked at the code and saw the actual index update is done on hook_exit only for last node for which hook_nodeapi was triggered. The data is transferred in a global variable $update_node_index.

What's the reason for it? I tried moving _node_index_node call into hook_nodeapi and all works for me now. But it's suspiciously easy to be correct fix. Any ideas?

akamaus’s picture

Status: Needs work » Needs review
StatusFileSize
new1.42 KB

I looked at the code path more carefully. my previous solution didn't work correctly, because _node_index_node calls node_load which returns a cached version of node, which is stored in a static variable $nodes.