- Overview
- Indexing
- Searching
- Browsing
- Ignoring
- Preferences
- Tips
- Troubleshooting
Overview
This page shows you how to use Raycast’s file search, with a new engine independent of Microsoft’s Windows Search. You can access it either by going into the Search Files command (we recommend setting a hotkey in Settings for quick access), or searching for files directly in root search. By default your users folder is indexed C:\Users\(username).
Indexing
Raycast stores data about relevant files in an index that we keep up-to-date with the file system, in the background. When you open File Search, you might see the indexing progress. This is updating your index server with your latest file changes. We show your last used files by default, that is, the files that you’ve recently opened in Explorer.
Searching
When you enter a file or folder name in File Search on in the main window, you’re searching the index. Search supports a number of different features, depending on how you enter the query. During indexing, we tokenize file names and file paths, i.e. split them into searchable words: we split file names on whitespace, punctuation, “camel humps” (e.g. “FileSearch” gets split into “file”, “search”), lowercase, and ASCII fold (e.g. é becomes e). File paths are split into their path segments. Multiple search terms are implicitly joined by an AND. You can search files by file extension, inside relative parent folders, and you can prioritize folders in search results.
Some example queries (”entries” meaning files, folders, and symlinks):
foo: Finds entries starting withfooin one of its name components, so you would findfoo.pdf,My Foo Bar, orMyFooDocument.foo bar: Finds all entries containing both foo and bar in its name components; this also works for file extensions, for example:foo pdffinds all foo entries with apdfextension.foo .pdf: Finds all pdf files withfooin its name components (vs.foo pdfwhich would matchpdfnot only in the file extension but also in the file name components).foo/: Finds all entries withfooand prioritizes folders – handy for listing common folder locations such asDownloads/; just continue writing to search inside the folder, see next:foodocs/bar: Finds allbarentries in a folderfoodocs; this is a powerful way to narrow down search results when you’re only interested in the documents of some parent folder in the folder hierarchy. You can also enter the parent folder after the file name: say you’re searching for a fileconfig.jsonbut this yields too many search results. Just continue typing/projectsto only get the files under some ancestorprojectsfolder.
Tip: Press Tab on any entry to expand the full path and enter “browsing mode”.
Browsing
Whenever you enter a valid absolute path starting with \, / ~\ or ~/ in the search bar, you will see a 1:1 representation of the file system (similar to what you’d see in Explorer, Powershell or the Command Line). Some examples of what you can do in this mode:
- Filter the current directory results by typing one or more prefixes of a file or folder name.
- Enter the selected folder by typing a trailing
/or by pressing theTabkey; if the selected entry is a file,Tabcompletes the full path; if the entry is a symlinks or alias, it gets resolved to the target path; navigate back up to the current level by pressing⇧Tab. - Press
Ctrl↵to show an item in Finder; perform other file actions viaCtrlK. - Press
CtrlPwithin the Search Files command to filter by file type
Browsing also supports using environment variables that are automatically expanded into larger values. For example, one can use %USERPROFILE% to refer to the value of that variable (typically C:\Users\<your user>). For those more used to UNIX environment variables, we also support using ${USERPROFILE} or $USERPROFILE, for example.
Ignoring
By default, the index excludes all files and folders excluded via .gitignore, .ignore, and Git’s global and local exclude configuration. Ignore files are processed hierarchically: they can reside at any level and patterns apply relative to the location of the ignore file.
If you wish to apply specific rules for Raycast’s file search only, you can put a .rayignore file in that folder or maintain a single file higher up, for example in your user folder, e.g. ~/.rayignore.
In all cases, the supported pattern format is Git’s format.
You can use a quick action to exclude an individual file from the index. Type Ctrl K and use the Exclude From Index action. This action will try to find an existing .rayignore file in the same directory (or one of its parents) and append the file to it, and if one doesn’t exist or is not writable, we try to create a new one in the same location as the file to be ignored.
Preferences
In File Search preferences you can:
- Add custom search scopes; those are folders that will be additionally indexed; keep in mind that large folders can increase the index size, indexing times, and impact search. Examples of when you might want to add a custom search scopes:
- include files of hidden folders such as
~/.config - include other fixed drives in your system
- Set up an Alias or Hotkey to access File Search even faster.
Tips
- When you set up an alias, you can type alias
Spaceto immediately jump into File Search and continue typing. - When navigating folders, press
Tabon any entry to expand the full path and enter “browsing mode”. HitTabto browse inside a highlighted folder orShift Tabto go back to the parent folder.