Skip to content

Search engine schema update documentation // migration #3092

Open

Description

@fschade

updating the search engine schema right now is a painful process which could include re-indexing the whole instance, making it batteries included is not an option in my opinion because we have no insights what each individual installation contains and what were allowed to touch or not.

Because of this we have to document one or two cases how such an schema update could look like, what needs to be done and evaluate feasible ways of a non re-indexing workflow.

This needs to be done for:

  • bleve search (our default build in search engine)
  • openSearch

Activity

  1. added theissue type on Jul 8, 2026
  2. changed the title [-]Search engine schema update documentation[/-] [+]Search engine schema update documentation // migration[/+] on Jul 8, 2026
  3. dschmidt commented on Jul 8, 2026

    @dschmidt
    Contributor

    We have an explicit message, that opensearch index is incompatible.
    Can/should we have an explicit message for bleve as well at least?
    I would like to avoid silent failure or an unreadable (and "unactionable" error message).

    I agree that a batteries included is very hard to get right, especially when thinking of kubernetes environments with multiple instances of the backend: which instance is allowed to update?

  4. butonic commented on Sep 10, 2026

    @butonic
    Member

    We discussed today how we can handle search index migration in a non breaking way. We could move the breaking change to a v2 package and keep the old implementation in place as the default? the process can start and we can nag the admin (IIRC we can now show messages to the admin) to rebuild the index and then flip an env var switch to move to the new search index.

    For main we could bring back the old index with a few bugfixes, right before we rewrote the service implementation.

    This approach can be used for future migrations, as long as they only affect the index and the backend code. The web ui might not find all new properties when the index changes or the search results might be too unspecific eg. for paths, but there will be more migrations in the future. This would be the first step to handle them gracefully in large deployments.

    The next step would be to be able to maintain both: the old and the new index and let the migration set a flag on a space to indicate which search index version should be used for search. The problem is that we would have to aggregate results in process and query both backends. Opensearch already supports merging results from multiple indexes but the mechanism cannot handle type changes. This does need more research, but being able to start building the index at runtime is the first step.

  5. dschmidt commented on Sep 10, 2026

    @dschmidt
    Contributor

    FWIW: I've extracted the most important breaking change out of the path pr referenced above into #3510.
    Stumbled upon the issue only when someone reported it and tried to fix it by treating a symptom. To be clear: it's not a regression in my work, it was a preexisting issue.

    Everything I "wanted" to break was in #3345. All my other PRs are non breaking and strictly additive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions