How to test Spotlight out in 30 seconds with Mints 1.0b11

Many of us have found that Spotlight doesn’t always seem to work correctly, sometimes to the point were it seems useless and we switch to using non-Spotlight search such as EasyFind or Find Any File. It’s surprisingly hard to test Spotlight properly, and you really need to inspect the log while testing, so that you can see if any errors are reported. That’s the major new feature in my free utility Mints.

mints11101

Mints has had a bit of a redesign to provide these new features, and now has a whole section devoted to Spotlight and its testing. Let me walk you through your first test.

The general plan is to create seven new files at the start of the test, give them a few seconds to trigger their indexing, then run a Spotlight search on the unusual text embedded in each of the files. Finally you browse the unified log for that 20-30 second period.

What I do for the first part of the test is wait until the menu bar clock ticks just after an exact minute, such as 01:00:00. A fraction of a second afterwards, click on the Create Test button in the Spotlight section in Mints’ window. Mints then copies seven test files from within the app to a known folder in your Home folder.

Within a second or two of that copying, Spotlight’s indexing service responds to the change, and adds those new files to its volume index. Wait a little longer, perhaps until 01:00:10, then click on the Check Search button. This runs a search on the whole of your Home folder, then opens a new window into which those search results are written.

mints11102

By now it’s getting on for 01:00:30, so click on the Log Window button and ensure the Period is set to include log entries going back at least to 01:00:00, just before you clicked the first button to copy the files.

mints11103

You should then see all Spotlight activity, corresponding to the initial indexing of those files, and performing and reporting on the search.

In this case, Spotlight found all but one of the files, the Rich Text document. For some reason, this currently doesn’t get indexed properly, and Spotlight will always draw a blank.

In the log extract, you should see something like:

  1. as soon as the files are copied, Disk Arbitration (blue) entries about mdworker_shared, which is harvesting metadata to add to the Spotlight index;
  2. mdworker (green) retrieves the user by their ID;
  3. mdworker translates that ID;
  4. mdworker load preferences from CFPrefsD;
  5. mds_stores compresses some of the harvested metadata;
  6. as soon as the search is called, a distinctive message from Spotlight Server (white) starting with KEEP!!!!!;
  7. Server starts the directQueryOpenReply, and QueryOpen is successful for the store;
  8. Spotlight Index (red) sorts pages;
  9. Server produces a reply to the query, with a qos (Quality of Service) value;
  10. mdworker retrieves the user by ID, translates it, and loads preferences again;
  11. Server produces any remaining replies, each with its own qos.

You can of course use the Spotlight log viewer to examine any other Spotlight activity that you wish, including your own searches.

Once you’re finished, click on the Delete Test button and the folder of test files will be removed. You can move or copy them to other locations to perform your own tests, of course.

Also new in this version of Mints is a window which gives detailed information about the execution environment for processes within Mints. This is intended for those who want to understand environmental settings likely to be encountered in similar situations.

mints11104

Mints version 1.0b11 is now available from here: mints10b11
from Downloads above, from its Product Page, and via its auto-update mechanism.

I think it’s now ready for release in its first full version. I’d appreciate any reports of bugs, please, and any feature requests, etc., before I proceed to build version 1.0.