Member Junction
    Preparing search index...

    Constraints assembled from one or more SearchScope records and handed to each provider so the provider can narrow its retrieval to the scoped surface and apply native permission / metadata push-down.

    Providers that receive scopeConstraints MUST implement permission push-down (see Section 3.6 of plans/search-scopes-rag-plus.md) — no result the calling user cannot see should ever enter RRF/re-rank.

    interface ScopeConstraints {
        Context?: SearchContext;
        Entities?: ScopeEntityConstraint[];
        ExternalIndexes?: ScopeExternalIndexConstraint[];
        QueryTransforms?: Record<string, string>;
        ScopeConfig?: Record<string, unknown>;
        StorageAccounts?: ScopeStorageConstraint[];
    }
    Index

    Properties

    Context?: SearchContext

    Multi-tenant runtime context — filters results to a specific tenant/dimension.

    For EntitySearchProvider / FullTextSearchProvider: only search these entities.

    ExternalIndexes?: ScopeExternalIndexConstraint[]

    For vector and 3rd-party index providers (Elasticsearch, Typesense, AzureAISearch, OpenSearch): only query these external indexes. Each entry carries its IndexType, native identifier, rendered MetadataFilter, and any ExternalIndexConfig.

    QueryTransforms?: Record<string, string>

    Optional per-provider query rewrites. Map key is the provider's DriverClass or SourceType. Provider uses this in place of the raw query when present.

    ScopeConfig?: Record<string, unknown>

    Advanced scope config passed through verbatim. Providers may inspect this for provider-specific knobs (e.g., vector namespace, route key).

    StorageAccounts?: ScopeStorageConstraint[]

    For StorageSearchProvider: only search these accounts/folders.