Files
opencloud/services/search/MIGRATION.md
T
José M. Requena Plens 283bbe4ee3 docs(search): extend the --insecure note to 8.1.x [docs-only]
8.1.0 ships before this fix, so it still needs the flag too.
2026-10-04 23:34:06 +02:00

48 lines
1.4 KiB
Markdown

# Migrating the search index
A version that changes how resources are indexed works on a new index and
leaves the old one untouched. The service starts normally, but the new index is
empty: search finds nothing until it is filled. The old index stays around
until you remove it.
## v7.x.x to v8.x.x
> [!IMPORTANT]
> On 8.0.x and 8.1.x, `opencloud search index` needs `--insecure` in the
> default setup, where the search service runs gRPC without TLS: add it to the
> commands below. Later releases don't need it.
### OpenSearch
Fill the new index by indexing all spaces again:
```shell
# the service keeps running while it happens
opencloud search index --all-spaces
```
Once the new index is filled, every index but the one with the highest
`-v<N>` suffix can go (indexes up to 7.4 have no suffix):
```shell
curl "https://os.example.com:9200/_cat/indices/opencloud-resource*"
curl -X DELETE "https://os.example.com:9200/opencloud-resource"
```
### bleve
The new index is a directory next to the old `bleve` one, both in
`$OC_BASE_DATA_PATH/search` by default (`SEARCH_ENGINE_BLEVE_DATA_PATH`). A
bleve index cannot be copied, index all spaces again:
```shell
opencloud search index --all-spaces
```
Once the new index is filled, every directory but the one with the highest
`bleve-v<N>` suffix can go (directories up to 7.4 have no suffix):
```shell
rm -r "$OC_BASE_DATA_PATH/search/bleve"
```