---
title: SQL search controls
related:
  - https://docs.kentico.com/k12sp/configuring-kentico/setting-up-search-on-your-website/using-locally-stored-search-indexes/sql-search.md
  - https://docs.kentico.com/k12sp/configuring-kentico/setting-up-search-on-your-website.md
---

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

SQL search controls allow users to search through the content of a website's pages. The controls use the SQL search engine, which utilizes standard queries to find results in the Kentico database.

> **Note:** **Note**: Current versions of Kentico provide an index-based [smart search engine](https://docs.kentico.com/k12sp/configuring-kentico/setting-up-search-on-your-website.md). The smart search has significantly better performance than the SQL search.

The SQL search uses the following queries:

- Automatically generated queries for the data of individual [page types](https://docs.kentico.com/k12sp/developing-websites/defining-website-content-structure/creating-and-configuring-page-types.md). To override the search query for a page type, create a new query named **searchtree** in _Page types -> Edit page type -> Queries_.
- The **searchdocuments** query of the **Root** page type for fields that are shared by all pages (such as the document name).
- The **searchattachments** query of the **Root** page type for files uploaded as page attachments. To search attachments, you need to configure the system as described in [Configuring SQL search for attachment files](https://docs.kentico.com/k12sp/configuring-kentico/setting-up-search-on-your-website/using-locally-stored-search-indexes/sql-search/configuring-sql-search-for-attachment-files.md).

##### Available controls:
