# 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: 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://documentation.ajaxsearchlite.com/general-options/search-logic.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.
