When searching for products on the website, you can use specialized search operators to refine your results and find exactly what you're looking for. This guide explains the available operators and demonstrates how to use them effectively.
Search operators allow you to narrow down results, exclude certain terms, search within specific categories, and more.
The following sections outline each available operator and provide examples of their application.
Lets go over a few definitions first:
Examples:
Search String | Results |
---|---|
Red | Searches for everything that has the word red in it |
Red nail | Searches for everything that has the word red OR nail |
"Red nail" | Searches for everything that matches the phrase red nail |
Boolean operators allow you to apply Boolean logic to searches, requiring the presence or absence of specific terms or conditions in fields in order to match documents. Multiple terms can be combined together with Boolean operators to form more complex queries. The table below summarizes the Boolean operators supported.
Boolean Operator | Alternative Symbol | Description |
---|---|---|
AND | && | Requires both terms on either side of the Boolean operator to be present for a match |
NOT | ! | Requires that the following term not be present |
OR | || | Requires that either term (or both terms) be present for a match |
+ | Requires that the following term be present | |
- | Prohibits the following term (that is, matches on fields or documents that do not include that term. The - operator is functionally similar to the Boolean operator ! |
** When specifying Boolean operators with keywords such as AND or NOT, the keywords must appear in all uppercase
Boolean Operator | Query Example | Results |
---|---|---|
AND / && | nails && screws | Must contain both the words nails and screws for it to show up in search |
NOT / ! | !nails | Finds all products that don't contain the word nails |
OR / || | nails || screws | Finds all products that contain the words nails or screws |
+ | +nail kit | All products that show up must have the word nail in it, but kit does not have to be present |
- | Flathead -"screw driver" | Finds all products that has the word flathead in it, but does not contain the word screw driver |
Use parentheses to group clauses to form sub-queries. This can be very useful if you want to control the Boolean logic for a query
Boolean Operator(s) | Query Example | Results |
---|---|---|
() / OR / AND | (nails OR screws) AND red | This requires the term red to exist along with either nail or screw |
The search engine gives the following characters special meaning when they appear in a query:
+ - && || ! ( ) { } [ ] ^ " ~ * ? : /
To make the search engine interpret any of these characters literally, rather as a special character, precede the character with a backslash character \.
Example:
Special Character | Query Example | Results |
---|---|---|
" | "1-3/4\"" | This will search for any product that has 1-3/4" in the product. If you don't include the \" it won't pick up exactly 1-3/4" and give more results |
Wildcard characters can be applied to single terms, but not to search phrases.
Wildcard Search Type | Special Character | Query Example | Results |
---|---|---|---|
Single character (matches a single character) | ? | r?d | This would search for words like red, rad, rod, etc |
Multiple characters (matches zero or more sequential characters) | * | tes* | This would search for words like testing, test, tested |
Fuzzy searches discover terms that are similar to a specified term without necessarily being an exact match
An optional distance parameter specifies the maximum number of edits allowed, between 0 and 2, defaulting to 2.
Special Character | Query Example | Results |
---|---|---|
~ | nail~ | This would search for words like nail, rail, tail, pail, nails, rails, tails, pails |
~ | nail~1 | This would only search for nail, tail, pail, and not nails, tails, etc because that would be an edit distance of 2 |
A proximity search looks for terms that are within a specific distance from one another. To perform a proximity search, add the tilde character ~ and a numeric value to the end of a search phrase.
Special Character | Query Example | Results |
---|---|---|
~ | "Plaster top"~10 | The distance referred to here is the number of term movements needed to match the specified phrase. So if the name of a product was 'Red Top Brand Finish Plaster - 50 lb Bag', with this search that product would pop up. However, if you searched "Plaster top"~2, this product would not pop up in the search |