Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
istride committed Jul 4, 2024
1 parent 3865a6d commit d637f2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions docs/elasticsearch.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Overview

Wagtail supports the use of Elasticsearch as a search backend, to speed up searches and remove the burden of searching from the relational database.
Wagtail supports the use of a relational database or Elasticsearch as a search backend. A relational database is sufficient for simple search queries and sites that do not require high performance. Elasticsearch allows the search capability to be scaled up and removes the burden of searching from the relational database.

By default, the relational database backend is used and there is no need for further configuration. The rest of this guide will explain how to set up Elasticsearch as a search backend.

# Setup

Expand All @@ -15,7 +17,6 @@ The outline of the setup process is as follows.
Create the file `docker-compose.override.yml`. Add the following to the file.

```yaml
version: '3'
services:
search:
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1
Expand All @@ -29,7 +30,7 @@ volumes:
search:
```
If you already have a `docker-compose.override.yml`, you will need to merge the snippet above into it, in which case, you will probably not need the first two lines.
If you already have a `docker-compose.override.yml`, you will need to merge the snippet above into it.

## Configure Wagtail to use Elasticsearch

Expand Down Expand Up @@ -60,5 +61,7 @@ To create and subsequently update the ElasticSearch index.
docker compose run --rm django python manage.py update_index
```

If the search function does not return any results for any search, it may be necessary to update the index. This applies whether or not Elasticsearch is used.


[search backends]: https://docs.wagtail.org/en/v2.15.6/topics/search/backends.html
[search backends]: https://docs.wagtail.org/en/v3.0.3/topics/search/backends.html
2 changes: 1 addition & 1 deletion iogt/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@
'TIMEOUT': CACHE_TIMEOUT,
'KEY_PREFIX': f'{KEY_PREFIX}_default',
},
# https://docs.wagtail.org/en/v2.15.6/advanced_topics/performance.html#caching-image-renditions
# https://docs.wagtail.org/en/v3.0.3/advanced_topics/performance.html#caching-image-renditions
'renditions': {
'BACKEND': CACHE_BACKEND,
'LOCATION': CACHE_LOCATION,
Expand Down

0 comments on commit d637f2c

Please sign in to comment.