# Search logic

![](https://3760515715-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MOpzRddcYVNgkLN4M3d%2F-MXgJzZ-VnmdmforVlOz%2F-MXgTLStE9jvl_DiakPu%2Fimage.png?alt=media\&token=da52cb6f-5314-4c84-a841-96682b950fdc)

### Exact matching

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

![](https://3760515715-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MOpzRddcYVNgkLN4M3d%2F-MXgJzZ-VnmdmforVlOz%2F-MXgTQnlVUrjPvbAe6N9%2Fimage.png?alt=media\&token=ac93bcb8-461c-4d94-b24a-0263c8e79c74)

#### 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)

![](https://3760515715-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MOpzRddcYVNgkLN4M3d%2F-MXgJzZ-VnmdmforVlOz%2F-MXgVj26RNF6v9LF0fRx%2Fimage.png?alt=media\&token=aae45fa4-0890-4b34-903d-53178d318ed3)

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](https://documentation.ajaxsearchlite.com/general-options/search-logic/search-logics-explained)
