SQL search

The SQL search is an obsolete search engine for pages in the content tree of websites.

We highly recommend using the index-based smart search instead.

The system continues supporting the SQL search for the following reasons:

  • Backward compatibility with older versions
  • Searching uncommon and legacy file types uploaded as page attachments

This search engine uses standard SQL queries to search for expressions:

  • The system automatically generates search queries for the data of individual page types. 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 searches fields that are shared by all pages.
  • The searchattachments query of the Root page type searches files uploaded as page attachments. To search attachments, you need to configure the system as described in Configuring SQL search for attachment files.

Adding the SQL search onto your website

To integrate the SQL search into website pages, use the web parts in the Full-text search category (SQL search dialog, SQL search box, etc.) or the CMSSearchDialog and CMSSearchResults server controls (in your ASP.NET code).

To exclude pages from the SQL search, open the Settings application and select the System -> Search category:

  • Exclude page types from SQL search - enter page type code names, for example cms.article.

    • You can enter multiple page types separated by semicolons (;).
  • Exclude pages from SQL search - allows you to exclude entire website sections from the SQL search

    • To exclude a single page, enter the alias path, for example: /news/news1
    • To exclude entire website sections, enter a path expression, for example: /news/%
    • You can enter multiple values separated by semicolons (;).

To directly exclude individual pages from the SQL search:

  1. Open the Pages application.
  2. Select the page in the content tree.
  3. Open the Properties -> Navigation tab.
  4. Check Exclude from search.
  5. Click Save.

Modifying the search result format

If you wish to change the format of the SQL search results:

  1. Open the Page types application.
  2. Edit () the Root page type.
  3. Select the Transformations tab.
  4. Adjust the SearchResults transformation.

Developing custom search providers

If you need to integrate a custom search engine or make additional modifications to the search results returned by the SQL search engine, you can develop your own search provider. You can find more details in Creating custom SQL search providers.