成人快手

Searching information on computersBoolean operators

Computers can hold huge amounts of information. Find the right information using databases and websites and understand how to build searches using Boolean logic.

Part of ICTData and databases

Boolean operators

The most common Boolean operators are AND, OR and NOT (always in capitals). They can be used to get more accurate search results.

AND

The words 'black' and 'shoes' will return results that contain the words 'black' and/or 'shoes'. You may get results that contain only one of the two words, eg 鈥榩urple shoes for sale鈥 or 鈥榖lack T-shirts for sale鈥.

In general, search engines treat the query 鈥榖lack shoes鈥 as 鈥榖lack AND shoes鈥 - which means results must contain both words, eg 鈥榖lack shiny shoes for sale鈥.

Sometimes you have to add AND to get results that contain both words. This won鈥檛 guarantee that the words will appear next to each other, only that both words will be present in results, eg 鈥榖lack T-shirts and purple shoes for sale鈥.

OR

Use OR to request an alternative, for example 鈥榖lack OR white shoes鈥. Most would interpret this as 鈥榖lack OR white AND shoes鈥.

NOT

NOT tells a search engine what to ignore. The query 鈥榮hoes NOT brown鈥 will return results that contain the word shoes but NOT the word brown. Some search engines use a minus sign in front of the word instead of NOT, eg -brown.

A Boolean search of shoes AND brown

Quotation marks

Although not strictly a Boolean operator, quotation marks can be used to get more accurate results. For example, use 鈥渂lack shoes鈥 to get results where the words 鈥榖lack鈥 and 鈥榮hoes鈥 appear together, eg 鈥榖lack shoes for sale鈥. By doing this, the result 鈥榖lack T-shirts and purple shoes for sale鈥 will not be returned.

More guides on this topic