Closed alexashley closed 3 years ago
In #60 we added a mechanism for applying index mappings that includes a method for migrating data after schema changes.
In order to re-use this code in Rode, we need to do a few things:
IndexManager
ProjectsIndex
IndexManager.LoadMappings
MapFS
Addressed in https://github.com/rode/es-index-manager/pull/1, https://github.com/rode/grafeas-elasticsearch/pull/80, and https://github.com/rode/rode/pull/77
In #60 we added a mechanism for applying index mappings that includes a method for migrating data after schema changes.
In order to re-use this code in Rode, we need to do a few things:
IndexManager
interface and remove the kind-specific methods (e.g.,ProjectsIndex
)IndexManager.LoadMappings
to be agnostic to the document kindIndexManager.LoadMappings
tests, use Go 1.16'sMapFS
to avoid changing internal state