The basics
Search looks through passages, the short sections of up to about 180 words that your documents are cut into. A long section is cut into passages that overlap by about 20 words. A heading is part of the passage that starts with it, so its words are searched like any others. Results update as you type.
Passages with more of your words rank higher. A word counts for more when it's rare in the folder the passage is in. A match counts for less in a long passage. Each folder isis was started with is weighed on its own, so a large archive doesn't change how the words of your notes count.
- Words match whole and in any case. Endings aren't removed, so
whale doesn't find "whales", but whale* finds both.
- A word is a run of letters and digits. A hyphen or an apostrophe splits it in two.
- Very common words such as "the" and "of" are ignored. So are single letters.
- A last word that isn't in your documents, such as one you're still typing, matches the longer words that start with it.
- A word that no passage contains is replaced with the closest word in your documents. The line above the results says so and has a link to search exactly what you typed.
- Your words also find close misspellings in your documents, which rank below the right spelling. A word one or two letters away counts as a misspelling when it is far rarer than yours, so a rare plural can turn up this way.
Meaning
With Meaning on, Search also finds passages that are close to your words in meaning, even if they use different words. Each result then shows its rank by keywords and its rank by meaning. The order of results combines the two. Passages without meaning data are ranked by keywords alone. Turn Meaning off to match your words only. The menu in the status bar picks the meaning model.
Phrases
"red door" finds those words next to each other and in that order, in any case. Any spaces or line breaks can come between them but punctuation can't. Common words count in a phrase. A phrase can also match inside longer words, so "red door" finds "red doors" too.
Wildcards
A * in a word stands for any number of letters or digits, including none. It can go anywhere in the word, as in hostage*, *mbrella or umbre*la. A wildcard matches whole words only, so umbre*la doesn't match "umbrellas". It works in phrases too, as in "red umbre*la".
Regular expressions
/text/ is a regular expression in Python's syntax. It ignores case unless it has a capital letter in it.
- It searches each passage's text. A heading's line keeps its # marks, so
/^Whales/ doesn't match # Whales.
. doesn't match a line break. ^ and $ mark the start and end of the whole passage.
\b marks the edge of a word and \w matches one letter, digit or underscore. So /\bhostage\w*/ finds the words that start with "hostage".
- Spaces are allowed inside, as in
/red door/. Write a slash inside it as \/.
- The closing slash must be followed by a space or the end of the query. Until you type it, the expression is ignored.
- On the public site a search that runs too long stops with an error. Searching again goes on from where it stopped. A query there can have up to 20 phrases, wildcards and expressions.
A phrase, wildcard or regular expression counts like one more word in the ranking. Each match adds to the score. On its own it lists only the passages that match. The first search with one checks every passage, which can take a few seconds in a large collection. After that its matches are remembered.
Capital letters
Case is ignored everywhere except in a regular expression that has a capital letter in it.
- Words ignore case, with or without
+ and -, so nasa finds "NASA" and "Nasa". So do the corrections and close misspellings Search finds for them.
- Phrases and wildcards ignore case, so
"red door" finds "Red Door".
- A regular expression ignores case unless it has a capital letter in it.
/nasa/ finds "NASA" and "nasa" but /NASA/ finds only "NASA". Escapes such as \B and \W don't count as capitals.
- To ignore case in an expression with a capital letter, start it with
(?i), as in /(?i)NASA \d+/. To match the case of just one part, wrap that part in (?-i:…), as in /(?-i:nasa) rocket/.
site: ignores case. doc: follows the rule for the word, phrase, wildcard or expression after it.
Keeping and removing
+word keeps only the passages that contain the word and -word removes them. Both work with phrases, wildcards and regular expressions, as in -"red door" or +/\d{4}/. Words after + and - match exactly, without misspellings.
- After
+, - or doc: a word is matched as it is written. So -e-mail removes "e-mail" and leaves "mail", and -the removes every passage that has "the" in it.
site:github.com keeps only documents whose url: line at the top is on that website or one of its subdomains. Several of them mean any of those sites. -site:github.com removes the site.
doc:word keeps the passages of documents that contain the word in any passage or heading. -doc:word removes every passage of those documents. It takes phrases, wildcards and regular expressions too, so homes -doc:house -doc:/decor\w*/ finds homes only in documents that never mention a house or decoration. doc:word means the same as +doc:word.
These rules apply before anything is ranked, so meaning never brings back a passage they rule out. site: and doc: rules don't change the order of results. On their own they list every passage they allow. - rules on their own find nothing.
Good to know
- The block between
--- lines at the top of a document isn't searched.
- A phrase split between two passages can be missed, although the overlap between passages catches most of them.
- A paragraph written as one very long line is one passage, however long it is.
- Search shows the best 50 passages.
- Click a result to open it in the reader with the passage highlighted. Click its title to open the document at the top. Its + Add button adds the passage to your task.
- The ⋯ menu on a result hides that passage or its whole document from this task's searches. They're listed under Hidden in Search.
- The folder boxes leave folders or sources out of Search and Related alike.
- Adjustments has sliders for the ranking. A preset saves the sliders, the folders, the hidden documents, the Meaning button and the search box under a name.
- Press Ctrl/⌘+K to come back to the search box. Press ↓ in the box or click the empty box to pick a recent search.