Building Logical Queries

 

Table of Contents

AND and OR containers

Logical containers are the backbone to building complex queries in Everlaw. The AND and OR terms create containers within the query builder that you can then add other search terms into. In addition, logical containers can also be nested within each other.  

Documents must satisfy all the search term criteria contained in an AND operator. Documents must satisfy one or more of the search criteria contained in an OR operator.

Let’s take a look at the complex search example below. Take a minute to try to interpret the logic of the query yourself before scrolling down to read to the explanation.

search49.png

The search in the figure above will retrieve documents that match the following criteria:

  • The document’s text contain either the word “california”, or the word “energy”, or both the words “wind” and “solar”
  • In addition, the document must be an email, or a spreadsheet, or a PDF

Remember that you can easily switch between the logical operators in the query builder by double-clicking on the logical operator.

toggling_logic.gif

If you have multiple logical containers in the query builder, the currently active container is designated by a thin blue border around the selected container. If you add new search terms into the query builder by clicking on them, they will automatically go into the currently active logical container. To change the currently active container, click once on the desired container so that the new container is outlined in blue. Now, any terms you click to add to the query will automatically go into the newly selected container.

active_containers.gif

Return to table of contents

Negating logical containers

You can negate any logical container that appears in the query builder by dragging and dropping a NOT term over the container, or by clicking the NOT term after selecting the desired container.

negating_containers.gif

Negating an AND container tells Everlaw not to return any documents that satisfy all the criteria within the AND container. In the screenshot below, this means Everlaw will return all documents that are not emails containing "energy." 

Screen_Shot_2019-03-14_at_11.45.18_AM.png

Another way of interpreting a search with a negated AND container is to first ignore the NOT term. In our example, if we ignored the NOT term, the search would return "emails that contain 'energy.'"

Then, to add the NOT term back in, simply prepend that with "everything but." In other words, the entire search below will return "everything but emails that contain 'energy.'" This means that PowerPoint presentations containing "energy" will be returned by this search, and emails that do not contain "energy" will be returned by this search, as well. A document must both be an email and contain "energy" to be excluded from the search.

Screen_Shot_2019-03-14_at_11.45.18_AM.png

It should be noted that negating an AND container is not the same as negating both search terms within an AND container. If both terms inside the AND container were to be negated, it would return all documents that do not contain "energy" and are not emails (i.e., documents that neither contain "energy," nor are emails). A PowerPoint containing "energy" would not be returned by this search, nor would any emails.  

Screen_Shot_2019-03-14_at_12.36.31_PM.png

Negating an OR container tells Everlaw not to return any documents that satisfy any of the criteria within the OR container. In the screenshot below, this means that Everlaw will return all documents that neither contain "energy," nor are emails. 

Screen_Shot_2019-03-14_at_2.33.07_PM.png

Similarly to negated AND containers, another way of interpreting a search with a negated OR container is to first ignore the NOT term. In our example, if we ignored the NOT term, the search would return "documents that contain 'energy' or are emails."

Then, to add the NOT term back in, simply prepend that with "everything but." In other words, the entire search below will return "everything but documents that contain 'energy' or are emails." 

Screen_Shot_2019-03-14_at_2.33.07_PM.png

Negating an OR container is not the same as negating both search terms with an OR container. If both terms inside the OR container were to be negated, it would return any documents that don't contain "energy," in addition to any documents that are not emails. The only documents excluded from this search would be emails containing "energy." 

Screen_Shot_2019-03-14_at_2.48.57_PM.png

Below is a table describing what documents will be returned by a search, depending on what the NOT term is applied to (logical container or search term). 

Search Will return Will not return
Negated AND container

Documents that do not satisfy at least one criterion within the container

Example: Non-email documents that contain "energy" and emails that don't contain "energy"

Documents that satisfy all criteria within the container

Example: Any emails that contain "energy"

Negated terms within an AND container

Documents that satisfy none of the criteria (pre-negation*) within the container

Example: Non-email documents that don't contain "energy"

Documents that satisfy at least one criterion (pre-negation) within the container

Example: Any emails and any documents that contain "energy"

Negated OR container

Documents that satisfy none of the criteria within the container

Example: Non-email documents that don't contain "energy"

Documents that satisfy at least one criterion (pre-negation) within the container 

Example: Any emails and any documents that contain "energy"

Negated terms within an OR container

Documents that do not satisfy at least one term (pre-negation) within the container

Example: Non-email documents that contain "energy" and emails that don't contain "energy"

Documents that satisfy all terms within the container 

Example: Any emails that contain "energy"

* "Pre-negation" refers to the search term without the negation applied. For example, if the two search terms are [Not Contents: energy] and [Not Type: Email], then the pre-negation terms are [Contents: energy] and [Type: Email]. Thus, "documents that satisfy none of the terms (pre-negation)" are those that neither contain "energy," nor are emails.


Return to table of contents

Additional options

You can specify additional grouping and filtering options for your documents by clicking on the search settings tab, located at the bottom right of each logical container.

Screenshot 2024-05-31 at 10.45.32 AM.png

From this menu, you can access the following options:

  • Include or exclude duplicates from your search results. This option will only appear on projects that have search deduplication enabled.
  • Randomly sample a specified percentage of documents from your search.
  • Group your documents by context and choose whether you’d like to remove certain family members from your search results.

To read more about grouping and removal options in Everlaw search, please see the grouping and filtering article.

A summary of your selected options will appear in a chevron-style list in the bottom right of the corresponding logical container. You can apply grouping and removal options to multiple logical containers. The settings selected on this tab will apply to all documents recalled by the logical container.

Here is an example of a search for which the search settings tab has been activated for more than one logical container:

search50.png

This search can be read like so: Documents containing both “solar” and “wind” and grouped by attachments, or containing “California,” including duplicates and grouped by exact duplicates, with 20% sampled of total results.

The documents in the results table will be organized into duplicate groups, including the attachments of the documents containing “solar” and “wind.”

 

 

Return to table of contents

Have more questions? Submit a request

0 Comments

Article is closed for comments.