List of Common Search Operators

Share

For reference, a list of common search operators found across several search engines, both search engines that are websites intended for web search, search engines that are simple search forms found in a website, and search engines that are applications that work locally.

Although not all search engines support all these search operators, it's a good idea to try all of them when you use a new search engine.

Minus Symbol

Minus symbol (-): excludes a term from search, e.g. included -excluded.

Most operators in this list only work if you type them immediately before a term, without spaces. This means if you type - excluded with a space between the minus (-) and the term excluded, the search engine won't recognize that as an exclusion operator, but as if they were two separate words (and will probably discard the minus for being too short for a word).

In general, operators that come before a word only work on that word specifically, so if there is a space character after the word, the effect of the operator doesn't extend to the next word, e.g. included -excluded included_again.

Double Quotes

Double quotes ("): known as "exact phrase search," if you surrounded multiple words with double quotes, they're searched for as a single phrase instead of as separate words, e.g. "the illusionist" wouldn't return results that only include the phrase a illusionist and the word the somewhere else.

In general, it's possible to combined double quotes with the minus operator by placing the minus before the double quotes: -"the illusionist".

Since you need to type two double quote characters for it to work, a common error is to type one of them and forget the other, e.g. "the illusionist wouldn't perform an exact phrase search because it's missing a double quote (") at the end.

This operator only makes sense in search engines that don't have exact phrase search by default, which is most of them. There could be a search engine out there that if you type moon eclipse it searches the phrase exactly, and you would have to type something extra for it to work the way search engines normally do, e.g. you would need to type a comma (,) or the word AND as in moon, eclipse or moon AND eclipse, so that it would search for moon, then search for eclipse, then combine the results.

Plus Symbol

Plus symbol (+): in some search engines that can handle synonyms to discard uncommon words, this ensure that word is included the way it is typed. Generally this makes the word more important. However, in most cases this doesn't seem to do anything, e.g. +the illusionist would force the word the to be included, as it's a common word generally discarded by search engines. Note that in a URL, + means a space, so if you see ?q=the+illusionist in the address bar, that means you typed "the (space) illusionist" in a search form.

Site: Operator

Site filter (site:): found in all major web search engines(Google, Bing, Yandex, Kagi, Brave Search, Mojeek), this operator makes the search engine return only results from a specific website. The way it works varies across search engines. In general, you type the domain name of the website after site:, e.g. site:reddit.com. In some search engines it may be possible to specify the subdomain and part of the URL as well, e.g. site:www.reddit.com/r/movies. See how to use Google's site: operator for details.

Asterisk

Asterisk (*), also called star, or wildcard operator: in some computer programs used to search and match text, an asterisk in text code means "any sequence of characters of any length." This means *.jpg, for example, means anything that starts with any characters, but ends in .jpg, e.g. photo.jpg, drawing.jpg, etc. Some search engines have a similar feature that uses this asterisk character, specially when used with double quotes. For example, if you search for "top 10 * movies" in Google, Google will "fill in the blanks" by replacing the asterisk with some other word or phrase, showing you results for "top 10 funny comedy movies," "top 10 action movies," etc.

Caveat: traditionally, an asterisk means any sequence of characters of ANY length, which means a zero-length sequence is a valid match. In our example, just the 4 characters .jpg is a valid match for the search pattern *.jpg, because the asterisk is matching an empty sequence. On Google, this isn't how it works: the asterisk operator ALWAYS matches at least one word. This means Google won't show you results for "top 10 movies" without anything between 10 and movies if you search for "top 10 * movies". However, other search engines work differently. Yandex, for example, implements an asterisk operator in the same fashion, but it will match "top 10 movies" if you search for "top 10 * movies".

OR Operator

The OR operator, or a pipe (|): in some search engines, it's possible to search for either of two terms at once. For example cute cats OR dogs, or cute cats | dogs would search for the term cute AND the term cats OR the term dogs.

In general, there is a grouping problem when using this sort of operator: does cute cats | dogs means:

  1. The result must contain the term cute. And it also must contain either the term cats or the term dogs.
  2. The result must contain either the two terms cute cats, or the single term dogs.

In general, search engines work the first way, because if they worked the second way then the OR operator wouldn't reuse any part of the query (in this case, the term cute), which means it would make more sense to just search for cute cats one time, then open a new tab in the web browser and search for dogs in that separate tab.

Parentheses

Grouping (()): in some search engines, it's possible to group operators in complex queries. This is generally only useful in search engines that have OR operators, or some way to affect several terms at once. For example, if you search for cute (brown dogs OR white (cats OR rats)), that would include results for:

  1. Cute brown dogs.
  2. Cute white cats.
  3. Cute white rats.

How much you can do with parentheses depends on the search engine. For example, Google has parentheses and the OR operator, but you can't use a minus symbol before the parentheses to exclude all terms inside the parentheses, e.g. -(brown dogs) doesn't mean the same thing as -brown -dogs in Google. Google just doesn't support this. Similarly, whether a search engine supports nesting multiple parentheses groups one inside the other also depends.

Regex

This feature is more common in search engines found in applications installed in your computer. This includes searching for text inside a file or a document opened in a text editing program.

Regex, short for regular expressions, is a type of text code for searching for things that is very powerful and used in various programs. It's essentially the standard way to write code to make a program find text.

An example: the regex .*\.jpg matches any character (.), any number of times (*), then matches a dot (\.), and the three characters jpg.

A more complex example: [0-9]+\.(jpe?g|png|gif|webp) matches the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ([0-9]), one or more times (+), then a dot ( \.), then matches one of these regex codes: jpe?g, png, gif, webp. This first regex, jpe?g, means the 2 characters jp, then e? means matching e zero-or-one times, i.e. this e is optional, then g. Essentially this means jpe?g matches both jpg and jpeg. This regex code would be used to match any image filename that is made entirely out of numbes and then an image file extension, e.g. 0.jpg, 02.png, 20240515.webp, etc.

Comments

Leave a Reply

Leave your thoughts! Required fields are marked *