Skip to main content
All CollectionsSearch
Boolean search tips
Boolean search tips

Include and exclude terms with AND, OR, AND NOT or ONLY Boolean operators for tasks such as tag exclusion and keyword searches.

John OHara avatar
Written by John OHara
Updated over a year ago

Basic Boolean Searches

You can use Boolean operators AND, OR, AND NOT to include or exclude certain search conditions.

⚠️ Ensure your Boolean queries are capitalized, otherwise Logikcull will search for the actual text of the operator "and, or, and not," etc.

For example:

tags:Harry AND tags:Sally

Include all documents tagged with both Harry AND Sally


tags:Responsive AND NOT tags:Privileged

Include all "Responsive" tags and exclude (AND NOT) all "Privileged" tags

(bean* OR rice) AND NOT quinoa

Include all keywords starting with "Bean" (bean, beans, beanie, etc) OR "Rice", but exclude any documents that contain "quinoa"

Exclusion Searches

Sometimes you need to run an exclusion search, or search using a negative clause. You can do this easily by starting your search query with the Boolean operator NOT.

For example, let's say you need to exclude all emails from domain names dogfancy.com or catfancy.com because they're irrelevant to your review. The search

document_type:Email AND NOT email_fields.from_domain:(dogfancy.com OR catfancy.com)

will result in excluding any emails where those domains are in the email from metadata.

Nested Boolean Searches

Searches run left-to-right taking each operator in order. However, to alter this order, you may "nest" your search conditions in parentheses, so that searches within the parentheses are run first, followed by those outside the parentheses, from left-to-right. Nesting alters the order of operations similar to mathematical equations.

For example, let's say you need to run a search for documents tagged "For Further Review" that are also tagged either "Hot" or "Responsive." The search

tags:"For Further Review" AND (tags:Hot OR tags:Responsive)
will result in only those documents tagged "For Further Review" that are also tagged either "Hot" or "Responsive:" (All search results will have either both "For Further Review" AND "Hot" or both "For Further Review" AND "Responsive.")

Without parentheses, the search

tags:"For Further Review" AND tags:Hot OR tags:Responsive

will return any document tagged with both "For Further Review" AND "Hot", OR any document tagged "Responsive," regardless of any other condition.

ONLY Searches

ℹ️ ONLY operator searches are available on native documents that are processed by Logikcull (File Uploads and Cloud Uploads).

Database Uploads with imported metadata are ineligible.

Searches for documents that match ONLY a given value. For example, a search for

ONLY email_fields.to:"Joe Cull"

Will return document in which "Joe Cull" is the ONLY metadata in the "Email To" metadata field.

The fields in which an ONLY operator can be used as a modifier are:

  • email_fields.to

  • email_fields.smtp_to

  • email_fields.cc

  • email_fields.smtp_cc

  • email_fields.bcc

  • email_fields.smtp_bcc

  • email_fields.domains

  • email_fields.recip_domains

  • email_fields.recipient_emails

  • email_recipients

💡 To search for a conversation ONLY between two parties, you can combine multiple fields, like this:

email_fields.smtp_from:corona.urn@liab.ly AND ONLY (email_fields.to:"elan rye" OR email_fields.smtp_to:elan.rye@liab.ly)

Which will return emails between Corona Urn and Elan Rye in which Corona Urn is the sender and Elan Rye is the recipient in the "To" field.

⚠️ Important: if you're using the Advanced Search Builder to construct your search query, you'll need to pay close attention to the order of operations and add parentheses to the resulting search in the search bar as necessary.

Advanced Examples

Search for a conversation ONLY search between two individuals, using Email Sender and Email Recipients field, in order to account for both SMTP email and friendly display names in To/CC/BCC fields:

(email_sender:((firstname1 lastname1)~3 OR first_last_1@address.com) AND ONLY email_recipients:((firstname2 lastname2)~3) OR first_last_2@address.com) OR (email_sender:((firstname2 lastname2)~3 OR first_last_2@address.com) AND ONLY email_recipients:((firstname1 lastname1)~3 OR first_last_1@address.com))

Similar search, but excluding CC and BCC fields:

(email_sender:((firstname1 lastname1)~3 OR first_last_1@address.com) AND ONLY email_fields.smtp_to:((firstname2 lastname2)~3) OR first_last_2@address.com) OR (email_sender:((firstname2 lastname2)~3 OR first_last_2@address.com) AND ONLY email_fields.smtp_to:((firstname1 lastname1)~3 OR first_last_1@address.com))

FAQs

Are there any limits to the number of Boolean operators that can be used in a search?

Yes, Logikcull has a limit of 1,024 Boolean operators per individual search (and a separate limit of 40,000 characters per search). You may opt to break a large search up into separate saved searches, then search on the combined saved searches, as a work-around to this limit.

Did this answer your question?