Wagtail
v0.7
  • Getting started
  • Core components
    • Sites
    • Pages
    • Images
    • Snippets
    • Search
      • Indexing
      • Searching
      • Backends
    • Form builder
  • Contrib components
  • How to
  • Reference
  • Support
  • Using Wagtail: an Editor’s guide
  • Release notes
Wagtail
  • Docs »
  • Core components »
  • 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 non-page models
  • Searching
    • Searching Pages
    • Searching Images, Documents and custom models
    • Frontend views
    • Editor’s picks
  • Backends
    • Database Backend
    • Elasticsearch Backend
    • Rolling Your Own

Indexing¶

To make objects searchable, they firstly need to be added to the search index. This involves configuring the models/fields that you would like to index (this 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 too so a users search query will match on their 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 non-page 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 two backends for storing the search index and performing search queries: Elasticsearch and the database. It’s also possible to roll your own search backend.

See Backends

Next Previous

© Copyright 2014, Torchbox. Revision d5d0dcc5.

Built with Sphinx using a theme provided by Read the Docs.