Scrivener’s Project Search Part One

Scrivener by definition divides the single large text file found in other word processors into smaller chunks. The more you subdivide your project the more precise your search results become and the easier it is to pinpoint a file, character, location, date, or a POV.

Project Search is one of the most comprehensive search tools available in Scrivener.

The three ways to start searching include:

1. Clicking the Search toolbar icon.

(Note the other options that are available this way as well.)


2. Using the Menu command Edit > Find > Project Search (Can also reach the Quick Search option this way as well.)

3. Use the Keyboard shortcut- Ctrl + Shift + F

What can you Search for using a Project Search?

Project Searches allow you to find instances of particular words, phrases, or metadata within the whole project. To do this you must choose the All option for the Search In criteria.

Search criteria can be narrowed by left clicking the Magnifying Glass Icon left of the Search field to see all these various search options. The default search option is All.

Other choices include:

Titles of your files/folders

Text

Notes

Synopsis

Keywords (see more below)

Label Values

Status

Section Types

Custom Metadata (Only one Individual Value/Entry at a time.)

A.) This can be further modified by choosing an Operator (how your search request is used to search Scrivener):any word, all words, exact phrase, whole word, or regex.

B.) At the bottom of the Search Menu are Options than can be used to further restrict the Search parameters to:

C.) Searching the Draft Folder Only

D.) Searching (the current) Binder Selection(s) Only

E.) You can check boxes to exclude the Trash and Template folders from your search.

F.) You can search only documents to be compiled (Included) or only those not being compiled (Excluded). The menu gives you the option to choose one or the other or both.

G.) You can make the search Case Sensitive, or Invert results and only search for documents NOT containing your search criteria. (For example, a label search with the Inverted results will return all files without that specific label or no labels if you use the wildcard (*) in the label search field.

Project Search does NOT search snapshots, though individual ones can be searched when opened.

The Final choice is to search by Dates modified or created.

Do this by right (not left) clicking on the magnifying glass icon left of the Project Searches’ text box. (see below)

The search by date can be combined with the search terms above, but will be discussed in detail in another blog.

How to Search Multiple things at once:

Normally you can only search one option at a time, but with a simple trick you can search multiple options at once. So you can search text, keywords, notes and the synopsis areas all at the same time.

The project search option will gather all binder documents that match your criteria on the left sidebar and temporarily replace your binder with a collection of results. This will appear as a Dynamic Collection under the title of Search Results. These results can be saved to run as a search again in the future. At the bottom of the search menu options is the choice to save your current search results as a Collection. This saved Collection is Dynamic by default and can be run again and again in the future. Search Results also function as a Dynamic Collection as well.

Note if searching for words or phrases in text, the Find next tool will advance from one search result in a single document (if there is more than one result in the document) or thru multiple documents by clicking F3. This will advance your cursor to the next instance of that text you are searching for in the editor window.

The Search Collection

Every time you do a project search you will create a special dynamic collection called Search Results. This will use the latest criteria you placed in the project search bar to create a Dynamic Collection of results from your Binder. This cannot be renamed. Files cannot be removed or added to this (or any) Dynamic Collection manually. Every project will have a search results available even if you have not run any searches on your project. This collection can be saved as a Static or Dynamic Collection for later use.

When you click on the Search Results collection, then the search criteria will appear in the project search bar. The current parameters for the search including the options for Search In, the Operator options, and the Options section will be used to search your project. The choices will all be the same as the last time the search was run even between sessions and stays this way until you create a new search.

When you choose the option to save the Search Results as a collection, by default it is saved as a Dynamic Collection. This can also be saved to a Static Collection. (And will be discussed in my Collection Series)

The Search Results can be refreshed by clicking inside the search bar and hitting the enter key and this will force a rerun of the current search criteria. This is a quick way to refresh results to reflect changes in your project.

The Search Results that you see can be sorted by clicking on the down caret besides the default option of Binder Order (see image below look at C), you can sort by Title or Date (and even arrange the date order by the newest items.) (Only when choosing Sort by Date does the option for Newest First become an active choice.)

To find a search result item(s) in the Binder, highlight the item(s) and either right click on its icon in the editor header and see the Reveal in Binder option, or use the Menu dropdown Navigate > Reveal in the Binder and the selected item(s) will be highlighted in the binder. This holds true if select one or multiple items even if they are widely spaced in your Binder.

Clicking the bent arrow in the search bar header (B) will load your search results in the editor in the Scrivenings, Corkboard, or Outliner Group views.

Keywords-

You can also search for Keywords using the Keywords Panel

You may search for multiple Keywords at once by separating each one by a space (or a comma and a space) and choosing the Keyword option. Your Operator option must be All Words for this to work. Then only those documents containing ALL the chosen keywords will be found. You could use location Keywords and POV Keywords to find scenes that occur in a specific location with one character. Obviously, using this method gives an ability to do very granular searches.

Metadata-

Searches are not case sensitive, while searches using Labels and Status can be case sensitive if you click that option.

Punctuation/Symbols/or nonsense letter combinations-

You can search for these like keywords in Titles of files/folders or in text. These can be used to find problems areas that need work or editing. You should use punctuation or symbols not normally used in your writing. (for example !!! Or ??? Would be unlikely to appear normally in your novel and could be used to mark text for future searches. Or letter combinations like xxx, or you could have a code like Fxxx for foreshadowing issues in your novel. These codes could be placed in side comments which are searchable (but results are not highlighted within comments). The advantage of using comments is that the codes do not need to be removed from your text and clicking the comments moves you to the exact point in the text that has an issue. The comment can be deleted as you fix the issues.

Section Types- Yes, these are used primarily for the compile function and to set formatting, titles, metadata etc. However they can used as a search tool. You can create your own section types such as Research, Deleted Scenes, etc that could be assigned to files or folders and thus can be searched for using the Section Type criteria.

Note: Your Search Results Highlight (Color)- This color can be changed via File > Options > Appearance > Textual Marks > Search Results Highlight. Here you can change the Highlight color to be easily visible based on your current theme. If you change themes then the Search Highlight color may need to be changed to be easily visible again. Note: By default Project/Quick Search results have a different highlight color for their results compared to the Find function results.

Refreshing a Search Result:

For the current search, after you set where you are searching in, the operator you are using, and what options you are using, then the search dynamically changes as you type until you stop.

When viewing Dynamic Collections or Search Results

Any changes elsewhere in the project will not be reflected in the current results of the Dynamic search until this search is refreshed. To do this either switch from one Collection tab to another or click inside the search field and hitting the enter key. This manually refreshes the search results to reflect the latest changes to your project.

If you click any Dynamic Collection (These always have a small magnifying glass to the left of the Collection title) then the search criteria will be run again and results updated based on the current documents and information in your project. If you click a Static Collection, then the same results as before will appear as this now represents a static list of documents you can manually add to or subtract documents from.

Search Tricks for text searches

To find documents which contain a word AND a specific/exact phrase do the following:

A. Set the Operator to All Words

B. Choose a word (ex. Bob) and a phrase (ex. black car) separated by a space. Now if you put in the search window Bob "black car" will find all documents containing both Bob and the phrase black car. Enclosing a phrase in quotes treats the phrase as a single word for the purpose of this search.

To find documents which contain one word WITHOUT another (find A but not documents containing both A and B) do the following:

A. Choose the word to search for (ex. Jane) then add the minus sign to eliminate a word that might be found with it in your story. (ex. Jane Doe).

So if you Search for Jane -Doe, this will find documents that have Jane, but not documents including the phrase Jane Doe. (The minus sign must be next to the second word or phrase without a space to work.)

This can be combined such as Jane -"Ace Reporter" and this will find documents with Jane, Ace, and Reporter, but not whole phrase Ace Reporter. The phrase Ace Reporter is treated as one word because of the quotation marks.

This technique can be used with the both the Any Word and All Word operators.

Finding Everything (* the wildcard symbol)-

If you put * in the search bar, you will find everything with the search parameter listed in the search results. (ie all documents with keywords, labels, etc.)

If you invert the results, found in the options section of the Project Search, then you find everything without a keyword, label, etc (ie not assigned yet.) Or by a modification date for everything recently modified.

(Note: If you want to find the actual asterisk symbol, then set the search Operator to “RegEx” and search for \*. )

Combo Searches-

This method does one search first with a keyword, label, metadata etc, then you can search that group of search results for files containing the same search terms in the text of those files. This requires just a few simple steps.

An example:

1. Do your Initial Search. For example, your initial search is a Keyword Search modified with a date criteria. For example, John cdate:>6m. This search would show every Document with the POV keyword John that was created within the last 6 months. If you had reversed the caret, then John cdate:<6m would find every document with John that had NOT been created in the last 6 months.

2. This generates a Search Collection using those criteria.

3. Click on one file inside the Search Collection, then use Ctrl + A to select all those files and view these in the Scrivenings group view.

4. Keeping the same word (a name of the POV) or using different text you change the search parameter from a keyword search to a text search. Now you will be searching the text only in Scenes where John is present. You can now look for clues, foreshadowing, locations, mentions of weather, etc.

Quickly clear the Project Search Text bar.

If words, or strings of letters are entered, will see an X on far right and clicking this will clear the Search Bar.

Search by Date:

I will discuss in a later blog.

Browsing and Sorting Your Search Results

You can use the previous and next buttons ˄ ˅ (The three stacked lines inside the green box (below) indicate the carets will be shifting up and down between files in the Scrivenings view.) in the editor header bar to navigate to the next or previous document to browse your search results. (or the keyboard shortcut Alt + Shift + with the up ↑ or down ↓ arrow keys)

Your search results can be further sorted by Binder Order, Title (alphabetically A-Z or Z-A), or Date (=Date Created)

Locating Search Results in Your Binder

You can select one, multiple, or all search results and right click on this to reveal the option to reveal in Binder. This will highlight your search results in the Binder View.

The Search Results Header Bar



The Dynamic Search Collection Bar above is different than that of a Static Collection.

Header Bar Options Include: (see the image above):

A. Click x to close the Search Results.

B. Click the bending arrow to display all the current Search contents in either the Scrivenings, Corkboard, or Outliner Views. In the Outliner and Corkboard you can further refine the results with Filtered Searches. (This will be discussed in a separate blog.)

C. The Binder Order option gives you choices on how to arrange your Search Results by Binder Order, Sort by Title, Date, or Newest First. You can change the order if this helps in reviewing the search results, these are not permanent changes. (The heading will change based on how you are sorting. See examples below.)

D. The magnifying glass indicates that the search is a dynamic one and the results will be regenerated every time you click on the Search Results to view its contents. The criteria of the current Search Results will remain unchanged until you run a new Project Search.

The Search Results are a dynamic collection and files cannot be added or removed from this or any Dynamic Collection.