# Using Parentheses (or Curved Brackets)

Parentheses or Curved Brackets should be used to group search terms when combining three or more terms with different Boolean operators, to indicate the order of search. Terms enclosed within parentheses/brackets are processed together first by the search engine.

For example, the following query searches for documents containing *care* and also containing either *cat* or *dog*:

> care AND (cat OR dog)

Without parentheses/brackets, the query <*care AND cat OR dog>* searches for documents containing *care* and *cat,* or containing *dog*, so would bring back many results about dogs unrelated to *care*.

&#x20;

Multiple sets of parentheses/brackets should be used in longer searches that combine multiple phrases together with Boolean operators, to designate clearly to the search engine how the search should be processed.

&#x20;

Searches within parentheses/brackets are performed first and parsing proceeds from left to right. Parentheses/brackets must be “balanced” around phrases so that both longer compound phrases and their shorter sub-components within are correctly enclosed in parentheses/brackets on either side.

&#x20;

In the search example below both variants give correct results because the phrase on the left contains balanced parentheses/brackets.

> *((pet OR animal) AND (interaction)) AND ((blood pressure) OR (cortisol reduction))*&#x20;

gives 2287 results

> *((pet OR animal) AND interaction) AND ((Blood pressure) OR (Cortisol reduction))*&#x20;

&#x20;also gives 2287 results

By comparison this third variant contains unbalanced parentheses/brackets on the left (a second extra right parenthesis/bracket) and gives 0 results:

> *((pet OR animal) AND interaction)) AND ((Blood pressure) OR (Cortisol reduction*))

&#x20;

The search results query text rendered immediately above Search Results shows you how the search has been parsed.

<figure><img src="https://1845104098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyPXMnkvXzlEiw7TrJeFh%2Fuploads%2FE8L4FJf0V8kfI7ywc7y3%2Fimage.png?alt=media&#x26;token=df8ff275-c3e1-4fd3-b768-88848023ec5f" alt="Example of search query text"><figcaption><p>Example of search query text</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.cabi.org/cabi-digital-library-help/search/using-parentheses-or-curved-brackets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
