ProtectedApiOnly sub-classes can access the API key
True when this driver does not accept ingestion via CreateRecord(s) /
UpdateRecord(s) — implies vectors are managed out-of-band (e.g.
SimpleVectorServiceProvider reads embeddings directly from
MJ: Entity Record Documents.VectorJSON). Pipelines that would
otherwise call ingestion APIs should short-circuit when this is true
to avoid spurious "unsupported" error logs.
Subclasses that genuinely support ingestion leave the default false.
Whether this provider's QueryIndex/HybridQuery params.id is the EntityDocumentID
(a GUID) rather than an external/logical index name. External services (Pinecone, Qdrant)
and DB-colocated providers key by an index name and return false (the default). The
in-process SimpleVectorServiceProvider reads vectors out of
MJ: Entity Record Documents keyed by EntityDocumentID, so it overrides this to true.
Callers that hold both identifiers (e.g. the duplicate-record detector) consult this to
pass the correct id for the resolved provider instead of assuming index-name semantics.
Whether this provider requires an API key / credential to operate. Defaults to true
for external, cloud-hosted vector services (Pinecone, Qdrant, …). Override and return
false for in-process / local providers that authenticate via the host process or the
application's own database rather than a remote credential — e.g. the in-memory
SimpleVectorServiceProvider, which reads vectors out of MJ: Entity Record Documents.VectorJSON and never calls an external service.
Callers that gate on a missing key (e.g. the Entity Vector Sync pipeline and the duplicate-record detector) consult this so a keyless local provider isn't rejected with a spurious "No API Key found" error.
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).
Whether this provider supports hybrid (vector + keyword) search. Override and return true in providers that implement HybridQuery().
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.).
The high-level filter options
A native filter object, or undefined if no filters
Derives the Pinecone namespace for a source record from VectorIndex.ProviderConfig.
Reads providerConfig.namespaceField — the name of the source-record field whose
value becomes the namespace (e.g. "OrganizationID" → namespace "org-uuid").
The resolved namespace is returned as { namespace: '<value>' } so CreateRecords
can route the vector without embedding org data in the stored metadata.
Run a colocated query that fuses a vector component with an optional keyword component
in a single server-side statement, applying an optional metadata filter. Only meaningful
when SupportsColocatedQuery is true; the default implementation throws to surface
misuse on providers that don't support it.
Optional_contextUser: UserInfoOptionalindexName: stringOptionalproviderConfig: Record<string, unknown>OptionalindexName: stringOptionalproviderConfig: Record<string, unknown>Delete ALL records from an index. Use with caution.
The name of the index to clear
Optionalnamespace: stringOptional namespace within the index
OptionalindexName: stringOptionalindexName: stringIf an indexName is not provided, this will use the default index name defined in the environment variables instead.
Optionalparams: BaseRequestParamsPerform a hybrid search combining vector similarity with keyword (BM25) matching. Only available on providers where SupportsHybridSearch is true. Default implementation falls back to a standard vector QueryIndex call.
OptionalcontextUser: UserInfoList vector IDs in an index with optional metadata filtering and pagination. Used by duplicate detection to discover which records exist in the index without loading entity data from the database.
List parameters including index name, optional metadata filter, and pagination
Page of vector IDs with optional pagination token for next page
Query the vector index with metadata filtering using SharedIndexFilterOptions.
Default implementation converts the filter options to a native filter object and delegates to QueryIndex. Providers can override BuildMetadataFilter() for custom filter syntax.
Standard query options with an additional metadataFilter field
OptionalcontextUser: UserInfoThe query response from the vector database
Query an index for nearest neighbours.
Query parameters (vector or record id, topK, filter, etc.)
Optional_contextUser: UserInfoOptional caller identity. Remote drivers (Pinecone,
Qdrant, pgvector) authenticate via their own credentials and ignore
this parameter. In-process drivers that need to honor server-side
row-level security (e.g. SimpleVectorDatabase, which calls RunView
to load entity vectors) require it. Pattern matches MJ's
RunView(params, contextUser) and GetEntityObject(name, contextUser)
conventions.
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.
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.
true if the host was wired in, false otherwise.
ProtectedwrapBuild 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.
Optionalmessage: stringOptional human-readable error detail; falls back to a generic message.
ProtectedwrapBuild a standard SUCCESS BaseResponse. Shared across all drivers so every provider reports results in a uniform shape.
The provider-specific payload to attach to the response.
The host relational connection a colocated provider borrows to store and query vectors in the same database as the application's entity data.
undefineduntil SetColocatedHost (or TryWireColocatedHost) is called.