---
title: Searching in documents
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

You can search for text in documents stored in the content tree.

### To search in documents

1. In the **Pages** application, click ****Search**** .

   ![Searching in documents](https://docs.kentico.com/docsassets/k8/searching-in-documents/searching_in_documents.png "Searching in documents")
2. In the **Website indexes** drop-down list, select whether you want to perform a [Smart search](https://docs.kentico.com/k8/configuring-kentico/setting-up-search-on-your-website.md) or [SQL search](https://docs.kentico.com/k8/configuring-kentico/setting-up-search-on-your-website/sql-search.md):
   1. **SQL search** - you need to select _(SQL Search)_; slower, but supports search in both published and unpublished documents.
   2. **Smart search** - you need to select a particular smart search index; fast, but does not support search in unpublished documents.
3. Specify the rest of the search criteria:
   1. **Search phrase**: the text that you are looking for; if you are searching using a Smart search index, you can use the syntax described [here](https://docs.kentico.com/k8/configuring-kentico/setting-up-search-on-your-website/smart-search-syntax.md); if you are searching using SQL search, standard SQL syntax can be used.
   2. **Search mode**: specifies how the search phrase will be used:
      1. _Exact phrase_- returns documents where the search phrase is found exactly as entered.
      2. _Any word_ - returns documents where at least one word of the search phrase is found.
      3. _All words_- returns documents where all words of the search phrase are found, regardless of their position or order in the text.
   3. **Language** - available if your site uses multiple cultures.
4. (SQL Search) Use the **Only published** check-box to determine whether you want to to include unpublished documents in the search or not.
5. Click on **Search**.

The system lists the documents it finds below the search box. 
