/[drupal]/contributions/modules/xapian/xapian.module
ViewVC logotype

Diff of /contributions/modules/xapian/xapian.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.10.2.7, Thu Feb 5 23:37:27 2009 UTC revision 1.10.2.8, Fri Feb 6 18:27:05 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: xapian.module,v 1.10.2.6 2009/02/05 23:10:50 jeremy Exp $  // $Id: xapian.module,v 1.10.2.7 2009/02/05 23:37:27 jeremy Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 751  function xapian_index_queued_nodes() { Line 751  function xapian_index_queued_nodes() {
751      // Re-index content that wasn't flushed to disk last time, minus the node      // Re-index content that wasn't flushed to disk last time, minus the node
752      // which failed last time.      // which failed last time.
753      $sql = 'SELECT nid FROM {xapian_index_queue} WHERE status > 0 ORDER BY COALESCE(priority, 0) DESC, added ASC';      $sql = 'SELECT nid FROM {xapian_index_queue} WHERE status > 0 ORDER BY COALESCE(priority, 0) DESC, added ASC';
754      $limit = $not_flushed - 1;      $config = variable_get('xapian_indexing_throttle', 100);
755        $error = $not_flushed - 1;
756        $limit = $config > $error ? $error : $config;
757    }    }
758    else if ($not_flushed == 1) {    else if ($not_flushed == 1) {
759      // Re-index a node that previously failed to index, removing it from the      // Re-index a node that previously failed to index, removing it from the
# Line 778  function xapian_index_queued_nodes() { Line 780  function xapian_index_queued_nodes() {
780    
781    $exclusions = array_values(variable_get('xapian_excluded_nodes', array()));    $exclusions = array_values(variable_get('xapian_excluded_nodes', array()));
782    while ($node = db_fetch_object($result)) {    while ($node = db_fetch_object($result)) {
783      $node = node_load(array('nid' => $node->nid));      $node = node_load($node->nid, NULL, TRUE);
784      if ($node) {      if ($node) {
785        if (in_array($node->type, $exclusions)) {        if (in_array($node->type, $exclusions)) {
786          // None indexable a node, log and clear it from the queue          // None indexable a node, log and clear it from the queue

Legend:
Removed from v.1.10.2.7  
changed lines
  Added in v.1.10.2.8

  ViewVC Help
Powered by ViewVC 1.1.2