> For the complete documentation index, see [llms.txt](https://documentation.ajaxsearchlite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ajaxsearchlite.com/general-options/search-logic.md).

# Search logic

![](/files/-MXgTLStE9jvl_DiakPu)

### Exact matching

When exact matching, the plugin always treats the search input as a single search keyword.

![](/files/-MXgTQnlVUrjPvbAe6N9)

#### Exact match location

| Keyword      | Fields                                                       | Location             | Match?  |
| ------------ | ------------------------------------------------------------ | -------------------- | ------- |
| hello wor    | <p><em>Post Title:</em><br><strong>Hello wor</strong>ld!</p> | Anywhere             | **YES** |
| llo wo       | <p><em>Post Title:</em><br>He<strong>llo wo</strong>rld!</p> | Anywhere             | **YES** |
| orld!        | <p><em>Post Title:</em><br>He<strong>llo wo</strong>rld!</p> | Anywhere             | **YES** |
| hello wor    | <p><em>Post Title:</em><br><strong>Hello wor</strong>ld!</p> | Starting with phrase | **YES** |
| llo wo       | <p><em>Post Title:</em><br>He<strong>llo wo</strong>rld!</p> | Starting with phrase | **NO**  |
| orld!        | <p><em>Post Title:</em><br>Hello w<strong>orld!</strong></p> | Starting with phrase | **NO**  |
| hello wor    | <p><em>Post Title:</em><br><strong>Hello wor</strong>ld!</p> | Ending with phrase   | **NO**  |
| llo wo       | <p><em>Post Title:</em><br>He<strong>llo wo</strong>rld!</p> | Ending with phrase   | **NO**  |
| orld!        | <p><em>Post Title:</em><br>Hello w<strong>orld!</strong></p> | Ending with phrase   | **YES** |
| hello wor    | <p><em>Post Title:</em><br><strong>Hello wor</strong>ld!</p> | Complete match       | **NO**  |
| llo wo       | <p><em>Post Title:</em><br>He<strong>llo wo</strong>rld!</p> | Complete match       | **NO**  |
| orld!        | <p><em>Post Title:</em><br>Hello w<strong>orld!</strong></p> | Complete match       | **NO**  |
| hello world! | <p><em>Post Title:</em><br><strong>Hello world!</strong></p> | Complete match       | **YES** |

### Search keyword logic (fuzzy logic)

![](/files/-MXgVj26RNF6v9LF0fRx)

When exact matching is disabled, then there are **4 possible logics** to choose from:

* OR (default)
* OR with exact word matches
* AND
* AND with exact word matches

The default is "OR". For more information about the logics please read [search logics explained](/general-options/search-logic/search-logics-explained.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://documentation.ajaxsearchlite.com/general-options/search-logic.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
