1. Help Center
  2. FAQ
  3. Search Optimization

What's Boolean Logic, and How Do I Use It in The Platform?

Here's everything you need to know about Boolean and search logic on the Echosec Systems Platform.

What Is Boolean Logic?
Using Boolean Logic in Echosec
Using Boolean and Search Logic in Beacon

 

What Is Boolean Logic?

Boolean Logic is a mathematical concept based on three simple words called Boolean Operators: AND, OR, and  NOT.

  • AND: All data points are present, exclusive.
  • OR: Any data point present, inclusive.
  • NOT: One data point is present but not the other. 

Boolean Logic is used to help you refine keyword searches in the Echosec Systems Platform. We'll also explain other operators for wildcard, fuzzy, proximity, and relevancy keyword searches in the Beacon section.

Capitalize the Boolean Operators AND and OR in your search queries. The Echosec Systems Platform highlights Boolean Operators it recognizes as you type.

 

Boolean Logic in Echosec

The Boolean Operators AND and OR can be used in the Echosec Quick Search keyword bar.

Combining Keywords

Use AND to combine keywords if two or more keywords must be found in the result, but not necessarily as an exact phrase. This is also Echosec's default logic, meaning that if you input multiple keywords without any Boolean Operators, all keywords must be contained in your search results. For example, the following queries retrieve the same results:

  • phone AND hack
  • phone hack

echosec BL phone AND hack

Use OR to include any of the keywords entered. For example, searching for phone OR cellphone searches for posts containing either of these words:

phone OR cellphone - echosec

To use the NOT Boolean Operator, Echosec users must save a Quick Search and create and apply an exclusion search filter using any undesired keywords:

Echosec custom exclusion filter

Grouping Keywords

Brackets [()] can also be used to encapsulate OR statements. This can be helpful for capturing spelling variations/mistakes, or if any keywords from a list can be found in the results. For example, say you want to search for the term "hack" for multiple device types:

  • (hack AND cellphone) OR (hack AND phone) OR (hack AND computer)

brackets example echosec

At the moment, it's necessary to repeat each set of keywords in the chain in Echosec, as demonstrated in the screenshot above—as opposed to using hack AND (cellphone OR phone OR computer).

Use quotes [“”] around keywords to return results with that exact phrase (there's no harm in doing this for single words, too). This is useful for multi-word phrases (e.g. "bank account," "don't come to school").

 

Boolean and Search Logic in Beacon

Search logic in Beacon is more complex and gives users additional options for wildcard, fuzzy, proximity, and relevancy keyword searches.

Combining Keywords

Use AND to combine keywords that must both be found in search results, but not necessarily as an exact phrase. This is also Beacon's default logic, meaning that if you input multiple keywords without any Boolean Operators, all keywords must be contained in your search results. For example, the following queries retrieve the same results:

  • counterfeit AND passport
  • counterfeit passport

counterfeit AND passport - beacon

counterfeit passport - beacon

Use OR to include any of the keywords entered. For example, the following search includes posts that contain either "passport" or "license:"

passport OR license - beacon

Use a hyphen (-) as the NOT Boolean Operator before undesired keywords. This is useful for excluding irrelevant results if the keyword has homonyms or multiple contexts.

For example, say you're searching for counterfeit passports, but you don't want to include Canadian passports in your results:

  • counterfeit AND -Canadian

    counterfeit AND -canadian - beacon

You can also use a hyphen with the Advanced Search > Site Domain filter to exclude specific domains from the results (e.g. -unwantedsitedomain.com).

 

Grouping Keywords

Brackets [()] can be used to encapsulate OR statements. This can be helpful when any one of a list of keywords should be found in the results, or for capturing spelling variations and mistakes. For example, to find the keyword "passport" and any number of words meaning fake, you could search:

  • passport AND (fake OR counterfeit OR duplicate OR realistic)

Quotations [“”] are used for exact phrase matching. For example, use quotations around “counterfeit passport” to search for the exact phrase, rather than those two keywords in any order.

Wildcard Searches

Wildcard characters act as placeholders to maximize search results. Beacon supports two types of wildcard operators.

Wildcard characters can't be used as the first character of a search.

The asterisk symbol [*] serves as a multi-character wildcard, meaning the symbol could be replaced by 0 or more characters in the results. For example, searching canad* could return results containing "Canada" or "Canadian:"

canad* - beacon
You can also use the asterisk with the Advanced Search > Email (e.g. *@yourdomain.com) or Advanced Search > Phone Number (e.g. 250*) filters to find any instance of a specific handle or area code.

The question mark [?] serves as a single-character wildcard, meaning it can be replaced by a single character. For example, searching st?le could return "stole" or "stale."

Fuzzy and Proximity Searches

The tilde symbol [~] can be used in two ways in Beacon.

Placing ~ after a keyword will find others that are spelled similarly. For example, searching grey~ could return "gray," "grey," "grew," or "prey."

Tilde [~] can also be used for a proximity search. This is helpful for finding two words within a specific distance of each other. To build a proximity search, place both keywords within brackets, followed by ~ and the distance the two keywords should be from one another by word count. For example, searching “counterfeit passport”~10 will return any results with the words “counterfeit” and “passport” within 10 words of each other:

proximity search - beacon

Marking Keywords as Important

Results in Beacon are sorted by relevance. This is determined by a number of factors including how often your term shows up and when it was created.

The ^ symbol can be used to boost keywords, marking them as higher relevance in your results. To boost a keyword, follow it by ^ and the "boost factor." Normally, all keywords have a boost factor of 1, and any other positive number can be used to mark other keywords as more important. For example, searching counterfeit passport^4 would mark "passport" as higher relevance than "counterfeit."

What if I Want to Search for These Characters?

To include any of these characters in your search instead of using them as described above, escape them by placing a backslash [\] before them. For example, searching for a smiley would look like \:\) instead of :).

You will need to escape any of the following characters in order to search for them:

+ - & | ! ( ) { } [ ] ^ " ~ * ? : \