Member Junction
    Preparing search index...

    Provides entity-level LIKE-based search using RunView + UserSearchString. Searches all entities where AllowUserSearchAPI=true, returning results with rank-based scores.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    config: SearchProviderConfig = null

    Config from the SearchProvider metadata record, set during Initialize()

    SourceType: SearchSource = 'entity'

    Which search source this provider represents

    PerEntityFetchDepth: number = ...

    How many rows to fetch PER ENTITY as the relevance-ranking candidate pool. This is DELIBERATELY decoupled from the global topK budget (bug C3): previously the per-entity limit was topK / entityCount floored at 3, so with ~150 searchable entities each entity returned only ~3 arbitrary rows and real matches beyond row 3 were never fetched — and enabling MORE entities starved each one further. Now each entity contributes up to this many candidates; the engine still trims the fused, relevance-sorted result set back to topK, so the returned count is unchanged — we only widen the candidate pool per entity. Public + static so a deployment can tune it at startup (larger entity counts may lower it to bound the row-materialization cost of the parallel fan-out), or override the default at process start via the MJ_SEARCH_PER_ENTITY_FETCH_DEPTH environment variable.

    PerEntityTimeoutMS: number = ...

    Per-entity hard timeout, in milliseconds. If one entity's RunView takes longer than this, we drop its results rather than hold the entire fan-out hostage. The query keeps running in SQL Server until completion (we can't cancel mssql Requests here), but the other entities' results still land for the user.

    Public + static so a deployment can tune it at startup — mirroring PerEntityFetchDepth. The 3s default keeps interactive/omnibar fan-outs responsive by dropping a pathological entity promptly instead of stalling the whole fan-out; deployments doing large unindexed LIKE scans can raise it, either by overriding the default at process start via the MJ_SEARCH_PER_ENTITY_TIMEOUT_MS environment variable or by assigning the static before serving:

    import { EntitySearchProvider } from '@memberjunction/search-engine';
    EntitySearchProvider.PerEntityTimeoutMS = 30_000;

    Accessors

    Methods