Wagtail Logo
v2.8.1
  • Getting started
  • Usage guide
    • Page models
    • Writing templates
    • Using images in templates
    • Search
      • Indexing
      • Searching
      • Backends
    • Snippets
    • Freeform page content using StreamField
    • Permissions
  • Advanced topics
  • Reference
  • Support
  • Using Wagtail: an Editor’s guide
  • Contributing to Wagtail
  • Release notes
Wagtail
  • Docs »
  • Usage guide »
  • Search
  • Edit on GitHub

Search¶

Wagtail provides a comprehensive and extensible search interface. In addition, it provides ways to promote search results through “Editor’s Picks”. Wagtail also collects simple statistics on queries made through the search interface.

  • Indexing
    • Updating the index
    • Indexing extra fields
    • Indexing custom models
  • Searching
    • Searching QuerySets
    • An example page search view
    • Promoted search results
  • Backends
    • AUTO_UPDATE
    • ATOMIC_REBUILD
    • BACKEND

Indexing¶

To make objects searchable, they must first be added to the search index. This involves configuring the models and fields that you would like to index (which is done for you for Pages, Images and Documents), and then actually inserting them into the index.

See Updating the index for information on how to keep the objects in your search index in sync with the objects in your database.

If you have created some extra fields in a subclass of Page or Image, you may want to add these new fields to the search index, so a user’s search query can match the Page or Image’s extra content. See Indexing extra fields.

If you have a custom model which doesn’t derive from Page or Image that you would like to make searchable, see Indexing custom models.

Searching¶

Wagtail provides an API for performing search queries on your models. You can also perform search queries on Django QuerySets.

See Searching.

Backends¶

Wagtail provides three backends for storing the search index and performing search queries: Elasticsearch, the database, and PostgreSQL (Django >=1.10 required). It’s also possible to roll your own search backend.

See Backends

Next Previous

© Copyright 2020, Torchbox Revision 932450f2.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: v2.8.1
Versions
latest
stable
v2.8.1
v2.8
v2.7.1
v2.7
v2.6.3
v2.6.2
v2.6.1
v2.6
v2.5.2
v2.4
v2.3
v2.2.2
v2.1.3
v2.0.2
v1.13.4
v1.12.6
v1.11.1
v1.10.1
v1.9.1
v1.8.2
v1.7
v1.6.3
v1.5.3
v1.4.6
v1.3.1
v1.2
v1.1
v1.0
v0.8.10
v0.7
v0.6
v0.5
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.