Searching

Discussion related to "Everything" 1.5 Alpha.
Locked
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Searching

Post by void »

Everything 1.5 improves searching performance.

Improvements to searching in Everything:
Faster searching
De-composition searching
Wildcard searching
Ignore punctuation
Ignore White-space
Match prefix
Match suffix
Environment variables
Search reordering
Search delay
Quick folders only searching
Group expansion
Match end of filename with dollar sign
Match start of filename with caret
Search properties
File list slots
Find duplicates
Macros
Preprocessor
Character entities
Search builder
Insert function
Omit results
Filters
Bookmarks
New search modifiers
Global search modifiers
Subexpressions
Clear button
Drag drop on search edit
Advanced

The Everything search syntax is unchanged.



Faster searching

Results are found up to 3 times faster when typing in the first letter of your search.
Results are found up to 100 times faster when typing in additional letters of your search.



De-composition searching

Searching will match de-composited Unicode characters, for example:
ẞ is the same as ss
æ is the same as ae

Everything will now also ignore Unicode combining characters, for example:
A + ◌̀ is the same as A

Everything will use de-composition searching and ignore combining characters when match diacritics is disabled.
Match diacritics is disabled by default.

To disable decomposition searching and match diacritics:
  • In Everything, from the Search menu, check Match Diacritics.


Wildcard searching

Everything will no longer match \ with the * wildcard.
Use ** to match \

? = match a single character.
* = match any character (except \) any number of times.
** = match any character any number of times.

For example:
c:\windows\*
will match files and folders directly in C:\Windows.

For example:
windows\*
will match files and folders directly in a Windows folder anywhere in your index.

Use the wildcards: search modifier to use sets, for example:
wildcards:[a-c][1-3]*

To match any character any number of times with a single *:
  • In Everything 1.5, from the Tools menu, click Options.
    Click the Advanced tab on the left.
    To the right of Show settings containing, search for:
    wildcards
    Select wildcards_star_all.
    Set the value to: true
    Click OK.
wildcards_star_all



Ignore punctuation

To ignore punctuation in filenames:
  • In Everything, from the Search menu, check Ignore Punctuation.
    -or-
  • use the nopunc: search modifier.
For example, spiderman will match spider-man and spider.man

Path separators in paths are treated as punctuation.
To paste text without punctuation, use Ctrl + Shift + V


Ignore White-space

To ignore White-spaces in filenames:
  • In Everything, from the Search menu, check Ignore White-space.
    -or-
  • use the nows: search modifier.
For example: spiderman will match spider man



Match prefix

To match only the start of words:
  • In Everything, from the Search menu, check Match Prefix.
    -or-
  • use the prefix: search modifier.
For example: ever will not match never, it will only match words starting with ever



Match suffix

To match only the end of words:
  • In Everything, from the Search menu, check Match Suffix.
    -or-
  • use the suffix: search modifier.
For example: foo will not match foot, it will only match words ending with foo



Environment variables

Environment variables are now automatically expanded, even when inside double quotes.

For example, %APPDATA% is replaced with: c:\users\<your user name>\AppData\Roaming

Use &percent: to search for a literal %
For example, to find a folder literally named %APPDATA%, search for: &percent:APPDATA&percent: or %""appdata""%



Search reordering

Searches are automatically reordered.
Faster searches are done first, slower searches are done last.

For example, take the following search:
content:"abc 123" ext:docx
Instead of looking for content:"abc 123" in all files, Everything will first find all docx files and then look for content.



Search delay

By default, there is no search delay after typing in a character in the search box.
Your search will commence immediately.

To set a search delay:
  • In Everything, type in the following search and press ENTER:
    /search_delay=1000
    where 1000 is the number of milliseconds to wait before performing a search.
    the default is: 0
    If successful you should see search_delay=1000 in the status bar for a few seconds.
Or set the search delay from Tools -> Options -> Search -> Search Delay.



Quick folders only searching

To quickly find folders only, include a single \ in your search.



Group expansion

Use <text> near other text to expand.
For example: gr<a|e>y is expanded to: gray|grey

Use "" to group expand two groups.
For example: <fast|slow>""<dog|cat> is expanded to: fastdog|slowdog|fastcat|slowcat

Group expansion also works with search functions that do not support sub-expressions.
For example: height:<720|1080> is expanded to: height:720|height:1080



Match end of filename with dollar sign

Regex matches the end of a filename with the dollar sign ($)
This option allows you to use a dollar sign to match the end of the filename with a normal search (without regex):

To enable matching of the end of the filename with a dollar sign:
  • In Everything, type in the following search and press ENTER:
    /match_end_of_filename_with_dollar_sign=1
    where 1 is on and 0 is off (default).
    If successful you should see match_end_of_filename_with_dollar_sign=1 in the status bar for a few seconds.
For example, to find files ending with hosts, search for:
hosts$

Use double quotes to search for a literal dollar sign, for example: "$$$"



Match start of filename with caret

Regex matches the start of a filename with the caret (^)
This option allows you to use a caret to match the start of the filename with a normal search (without regex):

To enable matching of the start of the filename with a caret:
  • In Everything, type in the following search and press ENTER:
    /match_start_of_filename_with_caret=2
    where 2 is match start of basename, 1 is match start of filename (or full path when match path is enabled) and 0 is off (default).
    If successful you should see match_start_of_filename_with_caret=1 in the status bar for a few seconds.
For example, to find files starting with everything, search for:
^everything

Use double quotes to search for a literal caret, for example: "^abc"



Search properties

Right click the column header of the property you wish to search and click Search for Property:




File list slots

Search for filelist1:
Ctrl + click the filelist1: text to set your file list search for slot 1 (slots 0-9 are avaiable).

More information and examples.



Find duplicates

To find duplicates in the results:
  • Right click a column header and click Find Property Duplicates.
For example, to find files in the result list with the same size:
  • Right click the Size column header and click Find Size Duplicates.
Files that are not duplicated are removed from the result list.
DUPE is shown in the status bar.
Double click DUPE in the status bar or type in a new search to restore all search results.



Macros

Define and undefine search macros for commonly used expressions.

To define a macro:
  • In Everything, type in the following search and press ENTER:
    /define name=search
    If successful you should see name=search in the status bar for a few seconds.
Now, when you type in name: it will be replaced with: search

For example, to replace the search progfiles: with "C:\program files\"
  • In Everything, type in the following search and press ENTER:
    /define progfiles="C:\program files\"
    If successful you should see progfiles="C:\program files\" in the status bar for a few seconds.
For example, to create an alias for the content: search function called text:
  • In Everything, type in the following search and press ENTER:
    /define text<search>=content:search:
    If successful you should see text<search>=content:search: in the status bar for a few seconds.
For example, to create an alias for the content: search function called text (behaves the same as above):
  • In Everything, type in the following search and press ENTER:
    /define text=content:
    If successful you should see text=content: in the status bar for a few seconds.
To undefine a macro:
  • In Everything, type in the following search and press ENTER:
    /undef name
    If successful you should see name undefined in the status bar for a few seconds.
For example, to undef the macro progfiles:
  • In Everything, type in the following search and press ENTER:
    /undef progfiles
    If successful you should see progfiles undefined in the status bar for a few seconds.
To list all macros:
  • In Everything, type in the following search and press ENTER:
    /define
    If successful you should see a semicolon (;) delimited list of all your macros in the status bar for a few seconds.
To list a macro's current search:
  • In Everything, type in the following search and press ENTER:
    /define name
    If successful you should see name=search in the status bar for a few seconds.
Macros are stored in your Macros.csv file in your %APPDATA%\Everything folder.


Preprocessor

The preprocessor performs text functions before the search is broken up into search terms.

You can build complex searches from the command line and macros.

Preprocessor syntax:
[function:arg1,arg2,arg3,...]

Useful search preprocessors functions from the search box:
[clipboard:] is replaced with the contents from the clipboard in real-time.
[include:"filename"] will load a search from a text/plain file.

Useful search preprocessor functions from the registry:
Set the search to the stem of the selected file: Everything.exe -s [stem:"%1"]
Set the search to the path part of the selected file: Everything.exe -s [pathpart:"%1"]

Everything will automatically apply the preprocessor to the search from the command line.

Search Preprocessor Help



Character entities

Everything uses the following syntax for character entities:
&character-entity-name:

ISONUM and ISOLAT1 character entities are supported, for example:
&amp:
&percent:APPDATA&percent:

Numeric character references are supported with &#nnnn: or &#xhhhh: for example:
&#xa0:

where nnnn is the Unicode code point in decimal and hhhh is the Unicode code point in hexidecimal.


C escape sequences are supported with &\a: or &\xhh: for example:
&\r:&\n:

To insert a literal space, press Ctrl + Alt + Space
This will insert a literal space: &#x20:
Using Ctrl + Alt + Space might be useful to avoid double quoting paths, for example:
c:\program<CTRL+ALT+space>files


Character entities to escape Everything operators:
&lt: == <
&gt: == >
&colon: == :
&vert: == |
&quot: == "
&excl: == !



Search builder
In development.


Insert function

There are many search functions in Everything, too many to remember.

To show a list of search functions:
  • In Everything, from the Search menu, click Insert Function....
Browse or search the list of search functions, click OK to insert the function into the search edit.
Function descriptions and examples are in development.


Omit Results

Omit Results can very quickly hide a list of unwanted files and folders from your results:
Toggling omitted results is instant.



To toggle result omissions:
  • In Everything, from the Index menu, click Enable Omit Results
    -or-
  • Right click the status bar and click Enable Omit Results
With omit results enabled, right clicking folders will give an option to add the selected file or folder to your result omission list.

More information here.



Filters

To organize filters:
  • From the Search menu, click Organize Filters....
    -or-
  • Press Ctrl + Shift + K:


Filters can now temporarily add columns, set the sort order and view:


For example, to temporarily show the length column when using the Audio filter:
  • In Everything, from the Search menu, check Organize filters....
  • Select the Audio filter and click Edit....
  • Change Columns to: Add columns....
  • Click Add....
  • Select the Length property and click OK.
  • Click OK.
  • Click OK.
  • Click OK.
For example, to temporarily show large thumbnails when using the Picture filter:
  • In Everything, from the Search menu, check Organize filters....
  • Select the Picture filter and click Edit....
  • Change View to Thumbnails (128 x 128) (Large).
  • Click OK.
  • Click OK.
To quickly select a filter, press Ctrl + K
The filter sidebar is in development.


Bookmarks

Bookmarks can now be organized into folders.

To organize bookmarks:
  • From the Bookmarks menu, click Show All Bookmarks....
    -or-
  • Press Ctrl + Shift + B:


Bookmarks can now set the columns:


To quickly select and open a bookmark, press Ctrl + B
The bookmark sidebar is in development.


New search modifiers

New search modifiers:
  • len: is now a search modifier. For example: len:stem:>100
  • binary: Treat the search and file content as a byte stream. For example: binary:content:\x00\x00\x01\x10
  • hex: Convert 2 character hex codes into a single byte and treats the search and file content as a byte stream. For example: hex:48656C6C6F
  • nopunc: Ignore punctuation. For example: nopunc:spiderman
  • nows: Ignore White-space. For example: nows:spiderman
  • prefix: Match the start of words. For example: prefix:ever
  • suffix: Match the end of words. For example: suffix:hosts
  • atoi: Compare a property as an integer. For example: atoi:album:>10
  • atof: Compare a property as a real number. For example: atof:album:>1.5
  • tostring: Compare a property as text. For example: tostring:dm:/02/
  • metric: Use the metric size format. For example metric:size:1kb == size:1000
  • notindexed: Lookup properties and content on disk (not from the index). For example: notindexed:length:>5m
  • nohighlight: Disable highlighting for this term.
New wildcards: search modifier syntax:

* = Matches any character zero or more times.
? = Matches any single character (including / or \).
# = Matches any single digit (0-9).
[ ] = Matches any one of the characters specified in the set.
[! ] = Matches any one character that is not specified in the set.
\ = Escape the following character. (treat the following character as literal)

Search modifiers can be applied to search functions.



Global search modifiers

Prefix a search modifier with :: to enable it globally.

For example, to enable match case for the rest of the search:
::case: FOO BAR



Subexpressions

Search expression can be specified inside a < > group when using a search function that accepts a text parameter:
function:<expression>

For example:
content:<abc 123>
is the same as:
content:abc content:123

For example:
content:<abc|123>
is the same as:
content:abc | content:123



Clear button

Click the X button to the right in the search box to clear the current search.





Drag drop on search edit

You can now drag drop files onto the search box by default.

To use only the basename when dropping a file:
  • Type in the following search and press ENTER:
    /hdrop_file_format=1
    where 1 is basename and 0 is the full path (default)


Advanced

Everything now supports multi-threaded property/content searching.

If you have a NVMe SSD, consider enabling multi-threaded access to the device:
  • Type in the following search and press ENTER:
    /no_incur_seek_penalty_multithreaded=1
    If successful, you should see no_incur_seek_penalty_multithreaded=1 in the status bar for a few seconds.
  • Type in the following search and press ENTER:
    /restart
    This can improve property/content search performance by up to 100% for each additional logical processor in your system.
    Use Tools -> Options -> Debug -> Statistics to check if Everything is using multiple threads for a device.



no_incur_seek_penalty_multithreaded is enabled by default in 1251a or later.



Default operators:
space = AND
| = OR
! = NOT

and: or: and not: can also be used as operators.
Locked