I'd like to suggest exposing the search indexed state of nodes (indexed or not indexed) to Views. One use case for this that I've come across is when search module crashes cron because of PHP code or something in the body of a certain node. It would be very helpful in identifying the node to get a list of those that haven't been successfully indexed yet.

Comments

traviscarden’s picture

Title: Expose indexed state of nodes to Views » Expose search indexed state of nodes to Views
Project: Drupal core » Views (for Drupal 7)
Version: 7.x-dev » 7.x-3.x-dev
Component: search.module » search data

I just realized this probably belongs in the Views queue.

dawehner’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev

In general features are implemented against 6.x first and ported later.

In general search_dataset.type = 'node' and sid = $nid and reindex = 0/1 should do it, right?

traviscarden’s picture

Thanks for the clarification on implementation policy, @dereine.

I don't get "under the hood" in Views, yet, but if it helps, I've successfully used this SQL before:

SELECT *
FROM node n
LEFT JOIN search_dataset d ON d.type = 'node'
AND d.sid = n.nid
WHERE n.status =1
AND (
  d.sid IS NULL
  OR d.reindex >0
);
dawehner’s picture

This should be possible definitive.

iamjon’s picture

Category: feature » task

I'm marking this as an unassinged task based on comment #4

mustanggb’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)