0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
wagtail/docs/topics/search/index.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.6 KiB
Markdown
Raw Normal View History

(wagtailsearch)=
2014-07-09 15:30:39 +02:00
# Search
2014-07-09 15:30:39 +02:00
2014-10-04 11:46:06 +02:00
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.
2014-07-09 15:30:39 +02:00
```{toctree}
---
maxdepth: 2
---
indexing
searching
backends
```
2014-09-28 11:11:34 +02:00
## Indexing
2014-09-28 11:11:34 +02:00
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.
2014-09-28 11:11:34 +02:00
See [](wagtailsearch_indexing_update) for information on how to keep the objects in your search index in sync with the objects in your database.
2014-09-28 11:11:34 +02:00
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 [](wagtailsearch_indexing_fields).
2014-09-28 11:11:34 +02:00
If you have a custom model which doesn't derive from `Page` or `Image` that you would like to make searchable, see [](wagtailsearch_indexing_models).
2014-09-28 11:11:34 +02:00
## Searching
2014-09-28 11:11:34 +02:00
Wagtail provides an API for performing search queries on your models. You can also perform search queries on Django QuerySets.
See [](wagtailsearch_searching).
2014-09-28 11:11:34 +02:00
## Backends
2014-09-28 11:11:34 +02:00
Wagtail provides two backends for storing the search index and performing search queries: one using the database's full-text search capabilities, and another using Elasticsearch. It's also possible to roll your own search backend.
2014-09-28 11:11:34 +02:00
See [](wagtailsearch_backends).