Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/palace/manager/search/revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def version(self) -> int:

def name_for_index(self, base_name: str) -> str:
"""Produce the name of the index as it will appear in Opensearch,
such as 'circulation-works-v5'."""
such as 'circulation-works-v8'."""
return f"{base_name}-v{self.version}"

def script_name(self, script_name: str) -> str:
Expand Down
5 changes: 1 addition & 4 deletions src/palace/manager/search/revision_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

from palace.manager.core.config import CannotLoadConfiguration
from palace.manager.search.revision import SearchSchemaRevision
from palace.manager.search.v5 import SearchV5
from palace.manager.search.v6 import SearchV6
from palace.manager.search.v7 import SearchV7
from palace.manager.search.v8 import SearchV8

REVISIONS = [SearchV5(), SearchV6(), SearchV7(), SearchV8()]
REVISIONS = [SearchV8()]


class SearchRevisionDirectory:
Expand Down
265 changes: 0 additions & 265 deletions src/palace/manager/search/v5.py

This file was deleted.

14 changes: 0 additions & 14 deletions src/palace/manager/search/v6.py

This file was deleted.

15 changes: 0 additions & 15 deletions src/palace/manager/search/v7.py

This file was deleted.

11 changes: 3 additions & 8 deletions src/palace/manager/search/v8.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,10 @@ class SearchV8(SearchSchemaRevision):

This revision is intentionally **self-contained**: it does not inherit from
any previous revision and defines its complete mapping (analyzers, filters,
and fields) directly. This is how new schema revisions are meant to be defined.
and fields) directly. This is how new schema revisions are to be defined.

We formed a bad habit for several old schema revisions where they just chained
off one another (``SearchV7`` -> ``SearchV6`` -> ``SearchV5``) which meant
no old revision could be removed without breaking the ones build on top of
it.

From now on every revision should stand alone so that, once nothing in
production is using an older version, that version's module can simply be deleted.
Every search revision should stand alone so that, once nothing in production
is using an older version, that version's module can simply be deleted.

Changes in v8:
- The shard and replica counts are set explicitly.
Expand Down
Loading
Loading