argia-migrator - v0.3.0
    Preparing search index...

    Class Migration<M, F>

    Sends writes and reads to two embedding profiles according to the current phase. One instance per process; the phase lives in memory, so every process in a fleet must be moved separately. The README's "Running more than one replica" section covers driving Migration.setPhase from a shared flag or config store.

    Type Parameters

    • M = unknown
    • F = unknown
    Index
    • Embeds and upserts into the to profile only, whatever the phase. Use it to fill the new index from your source documents without re-embedding everything the old index already holds. Every error throws: there is no shadow side here.

      Parameters

      Returns Promise<void>

    • Deletes from every store the phase writes to, the side being read first unless writeOrder is parallel.

      Parameters

      Returns Promise<void>

    • Asks both stores what they hold for each id and returns the ids where they disagree: a different version, or one side deleted and the other not. Use it to find what a reported shadow failure left behind, then write (or delete) those ids again from your source; the version rule makes rewriting a copy a store already has harmless.

      Pass ids in batches your stores can answer in one call. Both stores need versions. The result is a snapshot: a write running at the same time can show up as drift that is gone a moment later, so check again before acting on a short list. After to-only the old store stops receiving writes, so drift there is expected.

      Parameters

      • ids: readonly string[]

      Returns Promise<Drift[]>

    • Returns the k nearest documents from the profile the phase reads, passing filter to its store. In compare, a compareRate share of queries also run against the other profile with the same filter, and those calls wait for both.

      Parameters

      • text: string
      • k: number
      • Optionalfilter: F

      Returns Promise<Hit<M>[]>

    • Takes effect for calls that start after it; calls already running keep the phase they started with.

      Parameters

      Returns void

    • Embeds each document with every profile the phase writes to, and upserts the vectors. With the default writeOrder, the side being read goes first and the other side is written only if that succeeds, so it never holds a write the read side refused.

      Parameters

      Returns Promise<void>