diff --git apachesolr.index.inc apachesolr.index.inc
index 254c9c0..11ab713 100644
--- apachesolr.index.inc
+++ apachesolr.index.inc
@@ -46,7 +46,11 @@ function apachesolr_node_to_document($nid, $namespace) {
   }
 
   if ($build_document) {
-    // Build the node body.
+    global $user;
+    session_save_session(FALSE);
+    $saved_user = $user;
+    // Build the content as for an anonynmous user.
+    $user = drupal_anonymous_user();
     $node->build_mode = NODE_BUILD_SEARCH_INDEX;
     $node = node_build_content($node, FALSE, FALSE);
     $node->body = drupal_render($node->content);
@@ -154,6 +158,9 @@ function apachesolr_node_to_document($nid, $namespace) {
       $function = $module .'_apachesolr_update_index';
       $function($document, $node, $namespace);
     }
+    // Restore the user.
+    $user = $saved_user;
+    session_save_session(TRUE);
   }
   return $document;
 }
