Reputation: 542
I have to implement Near Realtime search for Solr, strictly connected with Drupal. After add/edit each node, trigger should run Solr to index new content ( via soft commit) , without rebuilding whole index. Hard commit. Hard commit/reindex will be run from cron and that part is easy. But how to make index of each new/edited node in NRS ?
I'm using: CentOS 6.4 (httpd + mysqld), Solr 4.3.1 Drupal 7 with apachesolr module,
I'll be grateful for any suggestions.
Regards
Upvotes: 3
Views: 253
Reputation: 794
Here's a solution that immediately indexes nodes on insert/update and only requires putting a little snippet of code into a custom module: https://www.drupal.org/node/1816462#comment-9093573
(Scroll up a bit to see implementation of hook_entity_insert/update().)
Upvotes: 1
Reputation: 1376
I have implemented NRS on various applications using the DIH by requesting delta-import command. Basically how it works is it keeps a timestamp record of when the last import was performed, and in your delta query you filter based on that timestamp. I have a job that tickles the delta command once every 5 minutes, but you could set the interval for what ever your requirement is.
Examples here.
Look for Delta-Import command.
Upvotes: 1