Skip to content

Commit

Permalink
Added explanation of new update schema rake task to new field documen…
Browse files Browse the repository at this point in the history
…tation

The update schema rake task can be useful when adding a new field because it does not require a full re-index of the content
  • Loading branch information
ryanb-gds committed Sep 1, 2023
1 parent caeacc5 commit 0206e36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/adding-new-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ This job will block other rake tasks from being run for 15 minutes to an hour.

[Read more about re-indexing the elasticsearch indexes here](https://docs.publishing.service.gov.uk/manual/reindex-elasticsearch.html#how-to-reindex-an-elasticsearch-index).

If you consider the change low risk and are only adding new fields for which content doesn't yet exist, you can run the `search:update_schema` task. This task will attempt to update the Elasticsearch index schema in place without requiring a re-index.
If you have made any changes which affect existing fields, Elasticsearch will reject the change and a full re-index will be required.

### Troubleshooting

#### The new field doesn't show up
Expand Down

0 comments on commit 0206e36

Please sign in to comment.