Wagtail Wagtail Documentation
  • Getting started
    • Your first Wagtail site
    • Demo site
    • Integrating Wagtail into a Django project
    • The Zen of Wagtail
  • Usage guide
    • Page models
    • Writing templates
    • How to use images in templates
    • Search
      • Indexing
      • Searching
      • Backends
    • Snippets
    • How to use StreamField for mixed content
    • Permissions
  • Advanced topics
    • Images
      • Generating renditions in Python
      • Animated GIF support
      • Image file formats
      • Custom image models
      • Changing rich text representation
      • Feature Detection
      • Dynamic image serve view
    • Documents
      • Custom document model
    • Embedded content
    • How to add Wagtail into an existing Django project
    • Deploying Wagtail
    • Performance
    • Internationalisation
    • Private pages
    • Customising Wagtail
      • Customising the editing interface
      • Rich text internals
      • Extending the Draftail Editor
      • Extending the Hallo Editor
      • Customising admin templates
      • Custom user models
      • How to build custom StreamField blocks
      • Customising the user account settings form
    • Third-party tutorials
    • Testing your Wagtail site
    • Wagtail API
      • Wagtail API v2 Configuration Guide
      • Wagtail API v2 Usage Guide
    • How to build a site with AMP support
    • Adding reports
    • How to add new Task types
    • Audit log
    • Accessibility considerations
    • About StreamField BoundBlocks and values
  • Reference
    • Pages
      • Theory
      • Recipes
      • Panel types
      • Model Reference
      • Page QuerySet reference
    • StreamField reference
      • StreamField block reference
      • Form widget client-side API
    • Contrib modules
      • Site settings
      • Form builder
        • Form builder customisation
      • Sitemap generator
      • Frontend cache invalidator
      • RoutablePageMixin
      • ModelAdmin
        • modeladmin customisation primer
        • Customising the menu item
        • Customising IndexView - the listing view
        • Customising CreateView, EditView and DeleteView
        • Enabling & customising InspectView
        • Customising ChooseParentView
        • Additional tips and tricks
          • Reversing ModelAdmin URLs
      • PostgreSQL search engine
      • Promoted search results
      • Simple translation
      • TableBlock
      • Redirects
      • Legacy richtext
    • Management commands
    • Hooks
    • Signals
    • Settings
    • The project template
    • Jinja2 template support
  • Support
  • Using Wagtail: an Editor’s guide
    • Introduction
    • Getting started
    • Finding your way around
      • The Dashboard
      • The Explorer menu
      • Using search
      • The Explorer page
    • Creating new pages
      • Selecting a page type
      • Creating page body content
      • Inserting images and videos in a page
      • Inserting links in a page
      • Inserting videos into body content
      • Inserting links to documents into body text
      • Adding multiple items
      • Required fields
      • Edit Page tabs
      • Previewing and submitting pages for moderation
    • Editing existing pages
    • Managing documents, images, snippets and collections
      • Documents
      • Images
      • Snippets
      • Collections
    • Managing Redirects
    • Administrator tasks
      • Managing users and roles
      • Managing Workflows
      • Promoted search results
    • Browser issues
  • Contributing to Wagtail
    • Issue tracking
    • Development
    • Committing code
    • UI Styleguide
    • General coding guidelines
    • Python coding guidelines
    • HTML coding guidelines
    • CSS coding guidelines
    • JavaScript coding guidelines
    • Documentation guidelines
    • Writing documentation
    • Reporting security issues
    • Wagtail’s release process
  • Release notes
    • Upgrading Wagtail
    • Wagtail 2.14 release notes - IN DEVELOPMENT
    • Wagtail 2.13 release notes - IN DEVELOPMENT
    • Wagtail 2.12.4 release notes
    • Wagtail 2.12.3 release notes
    • Wagtail 2.12.2 release notes
    • Wagtail 2.12.1 release notes
    • Wagtail 2.12 release notes
    • Wagtail 2.11.7 release notes
    • Wagtail 2.11.6 release notes
    • Wagtail 2.11.5 release notes
    • Wagtail 2.11.4 release notes
    • Wagtail 2.11.3 release notes
    • Wagtail 2.11.2 release notes
    • Wagtail 2.11.1 release notes
    • Wagtail 2.11 release notes
    • Wagtail 2.10.2 release notes
    • Wagtail 2.10.1 release notes
    • Wagtail 2.10 release notes
    • Wagtail 2.9.3 release notes
    • Wagtail 2.9.2 release notes
    • Wagtail 2.9.1 release notes
    • Wagtail 2.9 release notes
    • Wagtail 2.8.2 release notes
    • Wagtail 2.8.1 release notes
    • Wagtail 2.8 release notes
    • Wagtail 2.7.4 release notes
    • Wagtail 2.7.3 release notes
    • Wagtail 2.7.2 release notes
    • Wagtail 2.7.1 release notes
    • Wagtail 2.7 release notes
    • Wagtail 2.6.3 release notes
    • Wagtail 2.6.2 release notes
    • Wagtail 2.6.1 release notes
    • Wagtail 2.6 release notes
    • Wagtail 2.5.2 release notes
    • Wagtail 2.5.1 release notes
    • Wagtail 2.5 release notes
    • Wagtail 2.4 release notes
    • Wagtail 2.3 release notes
    • Wagtail 2.2.2 release notes
    • Wagtail 2.2.1 release notes
    • Wagtail 2.2 release notes
    • Wagtail 2.1.3 release notes
    • Wagtail 2.1.2 release notes
    • Wagtail 2.1.1 release notes
    • Wagtail 2.1 release notes
    • Wagtail 2.0.2 release notes
    • Wagtail 2.0.1 release notes
    • Wagtail 2.0 release notes
    • Wagtail 1.13.4 release notes
    • Wagtail 1.13.3 release notes
    • Wagtail 1.13.2 release notes
    • Wagtail 1.13.1 release notes
    • Wagtail 1.13 release notes
    • Wagtail 1.12.6 release notes
    • Wagtail 1.12.5 release notes
    • Wagtail 1.12.4 release notes
    • Wagtail 1.12.3 release notes
    • Wagtail 1.12.2 release notes
    • Wagtail 1.12.1 release notes
    • Wagtail 1.12 release notes
    • Wagtail 1.11.1 release notes
    • Wagtail 1.11 release notes
    • Wagtail 1.10.1 release notes
    • Wagtail 1.10 release notes
    • Wagtail 1.9.1 release notes
    • Wagtail 1.9 release notes
    • Wagtail 1.8.2 release notes
    • Wagtail 1.8.1 release notes
    • Wagtail 1.8 release notes
    • Wagtail 1.7 release notes
    • Wagtail 1.6.3 release notes
    • Wagtail 1.6.2 release notes
    • Wagtail 1.6.1 release notes
    • Wagtail 1.6 release notes
    • Wagtail 1.5.3 release notes
    • Wagtail 1.5.2 release notes
    • Wagtail 1.5.1 release notes
    • Wagtail 1.5 release notes
    • Wagtail 1.4.6 release notes
    • Wagtail 1.4.5 release notes
    • Wagtail 1.4.4 release notes
    • Wagtail 1.4.3 release notes
    • Wagtail 1.4.2 release notes
    • Wagtail 1.4.1 release notes
    • Wagtail 1.4 release notes
    • Wagtail 1.3.1 release notes
    • Wagtail 1.3 release notes
    • Wagtail 1.2 release notes
    • Wagtail 1.1 release notes
    • Wagtail 1.0 release notes
    • Wagtail 0.8.10 release notes
    • Wagtail 0.8.8 release notes
    • Wagtail 0.8.7 release notes
    • Wagtail 0.8.6 release notes
    • Wagtail 0.8.5 release notes
    • Wagtail 0.8.4 release notes
    • Wagtail 0.8.3 release notes
    • Wagtail 0.8.1 release notes
    • Wagtail 0.8 release notes
    • Wagtail 0.7 release notes
    • Wagtail 0.6 release notes
    • Wagtail 0.5 release notes
    • Wagtail 0.4.1 release notes
    • Wagtail 0.4 release notes
  1. Docs
  2. Usage guide
  3. Search
Edit on GitHub View source

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

  • Previous How to use images in templates
  • Next Indexing

Page contents

  • Search
    • Indexing
    • Searching
    • Backends
  • Features
  • About Wagtail
  • Services
  • Blog
  • Packages
  • Developers

Wagtail Sphinx Theme 5.0.3