Member Junction
    Preparing search index...

    In-process VectorDBBase driver that loads embeddings from MJ: Entity Record Documents.VectorJSON rows associated with a given EntityDocumentID.

    Callers pass the EntityDocumentID as the id field of QueryIndex params:

    provider.QueryIndex({ id: entityDocumentId, vector: queryEmbedding, topK: 10 }, contextUser);
    

    Multiple instances share one cache via SimpleVectorIndexCache.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    ColocatedHost: IColocatedVectorHost

    The host relational connection a colocated provider borrows to store and query vectors in the same database as the application's entity data. undefined until SetColocatedHost (or TryWireColocatedHost) is called.

    Accessors

    • get ApiKey(): string

      Only sub-classes can access the API key

      Returns string

    • get IsReadOnly(): boolean

      SVS reads vectors out of MJ: Entity Record Documents.VectorJSON; it intentionally does not implement CreateRecord(s). Flagging this lets ingestion pipelines short-circuit the upsert call instead of logging spurious "unsupported" errors per batch.

      Returns boolean

    • get QueryKeyIsEntityDocumentID(): boolean

      SVS keys its vector pool by EntityDocumentID — it reads MJ: Entity Record Documents rows WHERE EntityDocumentID = <id>. So callers must pass the EntityDocumentID (a GUID) as QueryIndex params.id, NOT a logical index name.

      Returns boolean

    • get RequiresAPIKey(): boolean

      In-process provider — it reads vectors from MJ: Entity Record Documents.VectorJSON and never calls an external service, so it needs no API key / credential. Lets the Entity Vector Sync pipeline and dupe detector skip the "No API Key found" guard.

      Returns boolean

    • get SupportsColocatedQuery(): boolean

      Whether this provider stores vectors inside the application's relational database and can resolve query results to entity records without an external mapping hop. Override and return true in colocated providers (e.g. PgVectorColocated, SQLServerVectorDatabase).

      Returns boolean

    • get SupportsHybridSearch(): boolean

      Whether this provider supports hybrid (vector + keyword) search. Override and return true in providers that implement HybridQuery().

      Returns boolean

    Methods

    • Convert SharedIndexFilterOptions to a provider-native filter object.

      Override this method in provider subclasses to produce provider-specific filter syntax (e.g., Pinecone, Weaviate, Qdrant, etc.).

      Parameters

      Returns object

      A native filter object, or undefined if no filters

    • Build per-record routing and operational directives for this provider.

      Called by the generic sync pipeline once per source database row, before the VectorRecord is constructed. The returned object is stored on VectorRecord.providerTemporaryDirectives and passed to CreateRecords alongside the stored metadata — but is never itself persisted in the vector index.

      Providers override this to extract whatever routing values they need from providerConfig (the parsed VectorIndex.ProviderConfig JSON) and from sourceRecord (the raw database row). Example: the Pinecone driver reads providerConfig.namespaceField, looks up the corresponding value in sourceRecord, and returns { namespace: '<orgId>' } so CreateRecords can route each vector to the correct Pinecone namespace without embedding org data in the stored metadata.

      The default implementation returns an empty object — providers that do not need per-record routing need not override this method.

      Parameters

      • _sourceRecord: Record<string, unknown>

        The raw database row being vectorized.

      • _providerConfig: Record<string, unknown>

        The parsed VectorIndex.ProviderConfig JSON blob.

      Returns Record<string, unknown>

      An opaque key/value map consumed by this provider's CreateRecord(s).

    • Wire in the host relational connection so this provider reuses it for colocated storage and queries instead of opening its own pool. No-op semantics for providers that ignore it; colocated providers require it before any operation.

      Parameters

      Returns void

    • Convenience used by callers that hold an opaque provider reference (the active MJ data provider). If host implements IColocatedVectorHost and this provider supports colocated queries, wire it in.

      Parameters

      • host: unknown

      Returns boolean

      true if the host was wired in, false otherwise.

    • Build a standard FAILURE BaseResponse.

      Always return this (never a success response) from a catch block — returning a success response on error silently swallows real failures and makes callers, and the vectorization pipeline, believe an operation worked when it did not.

      Parameters

      • Optionalmessage: string

        Optional human-readable error detail; falls back to a generic message.

      Returns BaseResponse

    • Build a standard SUCCESS BaseResponse. Shared across all drivers so every provider reports results in a uniform shape.

      Parameters

      • data: unknown

        The provider-specific payload to attach to the response.

      Returns BaseResponse

    • Drop a cached index. The BaseEntity event subscription handles this automatically for Save() / Delete() paths; call this manually only when writing VectorJSON via a path that bypasses BaseEntity (raw SQL, the sync pipeline's bulk inserts, etc.).

      Parameters

      • entityDocumentId: string

      Returns void