| 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 |
| 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 |
| 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 |