indexing Scrivener docs in Spotlight?

I’ve just discovered that if I search for terms contained within my Scrivener documents, Spotlight doesn’t find them. For example, if I have a document called “World Tour” and it had a note within it containing the phrase “the Alps are amazing”, searching for “Alps” in Spotlight does not find my document.

I’ve seen a few references to a Spotlight plugin but I don’t actually see that plugin anywhere.

Is Spotlight supposed to be able to find Scrivener documents by content? Is there something I need to do to make that work?

Thanks!

Does the Scrivener project show up in the results? Are you expecting Spotlight to find the individual rtf file within the Scrivener project, or the project itself?

No, the Scrivener project doesn’t show up in the results at all.

Now that I’m testing further, it looks like SOME projects do show up in Spotlight, and some do not.

For example, for two Scrivener projects, Africa.scriv and Europe.scriv, both contain the word “rivers” but only Europe.scriv shows up in a Spotlight search for “rivers”. However, a Spotlight search for “Africa” DOES find Africa.scriv.

So that made me more curious, and it looks like it’s related to having the document open, or the automatic Scrivener backups.

I tend to just leave Scrivener open all the time, with my 15 current Scrivener projects open. When I closed Africa.scriv and then re-opened it, it did its automatic backup thing … and then I re-tried the Spotlight search and “rivers” DID find Africa.scriv.

So it looks like maybe I just need to close them so they can back up more often, or something?

If you know exactly what’s going on here, could you add a note to the documentation?

Thank you!

Regardless of Spotlight’s behavior, leaving 15 projects open “all the time” is probably not a great idea. As you discovered, Scrivener’s automatic backups don’t run if the project is open, leaving you with a fairly significant amount of unprotected data.

Katherine

“Scrivener’s automatic backups don’t run if the project is open”

… they DON’T? Now I’m really confused.

The user manual says,

“Whenever you pause for two seconds, Scrivener’s auto-save feature will kick in and save all your recent work.”

It also says

“Scrivener automatically saves changes made to projects, but so that it is not constantly saving—and to avoid any slowdown and interruption to your work this might cause—Scrivener waits to save until you stop interacting with the program for more than two seconds”

but I would take that to include times when I’ve brought another application to the front.

In addition, I just tested with a manual save (just Cmd-S), and Spotlight didn’t find my latest change until I closed the Scrivener project and re-opened it.

It’s not a huge deal to get in the habit of, say, quitting Scrivener at the end of the day and re-opening it, but it was really unclear to me that this is how it works, and it might be helpful to update the manual to make sure others understand the auto-save behavior and the point at which Spotlight gets updated.

“Auto-save” and “backup” are two different features.

The auto-save feature saves whatever is in your computer’s memory to the current copy of the project. This protects you in case of, say, a power outage, but not in case of user or software error. If you accidentally delete 50,000 words, the auto-save will blithely obliterate those words from the current copy of the project. If someone else breaks into your Dropbox account and deletes the project, the local copy will be gone, too, as soon as Dropbox syncs.

The backup feature creates a brand new, completely independent copy of the project. The backup is what will allow you to recover those 50,000 words or, more commonly, the contents of a project that was mangled by misguided synchronization software. The backup is your protection against any error that you don’t discover in time to prevent the damage from being auto-saved.

Backup settings can be found in the Scrivener → Preferences → Backups pane. As noted above, backups generally don’t run while Scrivener is running. (Unless you check the Backup on manual save option.)

Sadly, many people discover this only when they lose several weeks of work because they’d left Scrivener running continually … and then their drive fails. Don’t be that person. Shut Scrivener down when you’re not using it. (There’s some other housekeeping that takes place when Scrivener shuts down, too, but the backups are what you’re most likely to miss if you don’t have them.)

Katherine

Now that we’ve got that straightened out…

Is the difference between one project being indexed and another apparently not that you’ve compiled something from the later, but not the former? I’m wondering if during the compile process, there’s a ‘index me’ type of file produced that MacOS looks for in the project package format… Or maybe it has to do with which documents are in the “Draft” folder versus those outside of it?

Now I’m curious, but I’m without my mac to try it on.

In my own testing, Spotlight does not appear to index Scrivener projects while they are open. This is pretty standard behavior for “background” type tasks. (And this is another reason to close things down when not in use.)

If you compile or create a backup, then you create a secondary copy of the project’s content that is outside of Scrivener’s current scope and therefore available to Spotlight. It’s also possible that Scrivener updates its own files (such as the search index) as part of the Compile process in a way that Spotlight can access.

Katherine