Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

As title says,

I want to load a particular node's document and When the editing is done, I need to send the modified document to Solr for re-index programtically.

How it can be done?

share|improve this question
1  
Based on your question, I think you are approaching your actual problem from a wrong angle. I'm guessing what you're trying to do can be achieved with a different approach. Can you specify what you want to achieve by doing this? Because when you resave the node, the document will be overwritten in the index anyway; no need to download the old data for that. – kekkis May 16 '12 at 7:37

1 Answer

up vote 2 down vote accepted

When using the apachesolr module, nodes are automatically marked for reindexing after an edit. So there is nothing you need to do.

If for some reason you need to manually mark a node, the code is

apachesolr_mark_entity('node', $nid);
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.