The Windows 7 search syntax is called Advanced Query Syntax.
It uses many symbols and a few words as operators to give some flexibility and specificity to searches.
Here is a summary of the operators:
( ) parentheses: search operators and text that is placed within parentheses is taken to belong to the search property immediately preceding the opening parenthesis.
For example, name:(cat man) gives results whose name contains words (or other text strings) that are or begin with both cat and man (but not merely either).
Parentheses can also be used to affect priority of special words AND, OR, and NOT as described later in these notes.
It is ineffective to place special search syntax symbols (=, ~=, and others described in the next few paragraphs) immediately before search text that is within parentheses, as the search results given are the same as would be there if the symbols were
not used. For example, instead of entering name:=(buns), enter name:(=buns), or since with a single word of search text the parentheses are optional, enter name:=buns.
" " quotation marks: By default, the “Find partial matches” setting is active (in the Folder Options dialog box, Search tab), which means that results include items with words that begin with the characters
of the search text. If quotation marks are placed around the search text, then the effect is the same as deactivating that setting, and the results only include items with words that are the same as the search text.
(Some special syntax described later can override the effect:
~, ~=, ~!, ~<, ~>, and $<.) When quotation marks are placed around two or more strings of text (words) separated by spaces, by default Windows 7 Search treats the strings as a list.
So, for example, name:"one two three" finds items whose names contain every string in the list, in any order. [Update: bizarrely, the mostly equivalent property called "filename" does enforce order, actually, while "file" and "name" do not.]
The quotation marks are not sufficient to treat the list as a single string (or phrase), when searching most properties.
Treating the list as a single string requires special syntax symbols (=, ~, ~=, ~!, <>, >, <, >=, <=, ~<, and ~> work, but $< and $= do not) to precede the first quotation mark.
Unfortunately, none of the working syntax symbols allow searching for a phrase that appears anywhere in the property text except for ~=, and ~= includes items that have other text immediately before or after the search text.
For example, content:~="goose pimple" would include items whose content text had “bgoose pimpleq”.
If only content with “goose pimple” as a distinct phrase was desired, then to get results closer to that desire (but not completely successfully), enter content:(~="goose pimple" "goose pimple").
That search would, however, include items that did not have the distinct phrase but instead “bgoose pimpleq” if the content text also had separate instances of “goose” and “pimple”.
If instances such as "bgoose pimpleq" are not considered to be a problem, then it is sufficient to enter content:~="goose pimple".
[Update: apparently special search symbols such as ~= don't work with the content property when searching in indexed locations, but do work when searching in non-indexed locations.]
With the use of special syntax symbols, quotation marks also allow searching for non-alphanumeric symbols that otherwise would not be searchable, as described in the section titled “How to search for symbols or text
containing symbols (non-alphanumeric):” later in these notes.