Member Junction
    Preparing search index...

    Parameters for executing a search.

    interface SearchParams {
        AIAgentID?: string;
        Filters?: SearchFilters;
        FusionWeightsOverride?: FusionWeightsByProvider;
        MaxResults?: number;
        MinScore?: number;
        Mode?: SearchMode;
        PermissionOverfetchFactor?: number;
        Query: string;
        ScopeIDs?: string[];
        SearchContext?: SearchContext;
    }
    Index

    Properties

    AIAgentID?: string

    Optional ID of the AIAgent on whose behalf this search runs. When set, the engine stamps it onto the SearchExecutionLog row so analytics can attribute usage back to the calling agent. Pass-through only — permission resolution does its own agent lookup separately via the resolver caller.

    Filters?: SearchFilters

    Optional filters to narrow results

    FusionWeightsOverride?: FusionWeightsByProvider

    Optional per-agent fusion weight override. When set, the engine applies these weights during cross-scope RRF fusion and honors them per-provider when weighting within-scope lists. Resolution order: this > SearchScope.ScopeConfig.fusionWeights > engine defaults. Example: { vector: 2.0, fulltext: 1.0, entity: 1.0, storage: 1.0 }.

    MaxResults?: number

    Maximum number of results to return (default: 20)

    MinScore?: number

    Minimum score threshold (0-1). Results below this are excluded after RRF fusion.

    Mode?: SearchMode

    Search mode: 'full' applies enrichment, 'preview' skips it for speed

    PermissionOverfetchFactor?: number

    Optional per-provider topK overfetch multiplier. Compensates for residual late permission filtering by requesting more candidates from each provider than the caller strictly wants. The final result count is still bounded by MaxResults. Default: 2.

    Query: string

    The search query text

    ScopeIDs?: string[]

    Optional array of MJ: Search Scopes record IDs. When provided, the engine resolves each scope's metadata (providers, external indexes, entities, storage accounts) and runs only those constrained providers. Results from multiple scopes are combined via cross-scope RRF fusion. When omitted/empty, behaves as if the Global scope was used (backward compatible). A single scope marked IsGlobal=true is also treated as no filter.

    SearchContext?: SearchContext

    Optional multi-tenant runtime context. Interpolated into each scope's Nunjucks-rendered MetadataFilter, ExtraFilter, UserSearchString, and FolderPath values so the same scope definition can serve many tenants. See Section 9 of plans/search-scopes-rag-plus.md.