Member Junction
    Preparing search index...

    Multi-provider note: callers under a non-default provider should set service.Provider = component.ProviderToUse before invoking any methods.

    Index

    Constructors

    Properties

    Errors$: Subject<string> = ...

    Error stream

    IsSearching$: BehaviorSubject<boolean> = ...

    Whether a search is in progress

    RecentSearches$: BehaviorSubject<RecentSearch[]> = ...

    Recent search history (persisted via UserInfoEngine, max 20 entries)

    Scopes$: BehaviorSubject<SearchScopeInfo[]> = ...

    Cached list of scopes the current user can see. Populated lazily by LoadScopes().

    SearchResults$: BehaviorSubject<SearchResponse | null> = ...

    Current search response

    Accessors

    Methods

    • Recently opened records for search empty states, newest first — same source as the omnibar's '#' empty state (MJ: User Record Logs via UserInfoEngine). Fail-soft: any error yields [] rather than blocking the surface. Display names resolve via GetEntityRecordNames with the record ID as fallback.

      Parameters

      • max: number = 3

      Returns Promise<RecentRecordItem[]>

    • Load persisted recent searches from UserInfoEngine. Safe to call multiple times — only loads once.

      Returns Promise<void>

    • Lightweight preview search for autocomplete/typeahead. Does NOT update SearchResults$ or IsSearching$ observables, and does NOT add to recent search history.

      Parameters

      • query: string
      • maxResults: number = 8

      Returns Promise<SearchResponse>

    • Phase 2C streaming search. Returns an Observable that emits one notification per provider as it returns, plus a 'fused' / 'reranked' / 'final' terminal event. Same auth + permission behavior as ExecuteSearch — denials surface as an error on the Observable.

      Consumers (typically the search composite component) should:

      • render skeleton rows immediately when the Observable is created
      • on each 'provider' event: append the rows for that source
      • on 'final': replace the partials with the canonical fused list
      • on error: show the failure message + clear the skeleton

      Returns rxjs Observable rather than awaiting a Promise — callers decide whether to subscribe + populate state, or unsubscribe on navigation. The service does NOT update its own SearchResults$ subject for streaming calls; the caller owns the partial-render state model.

      Parameters

      Returns Observable<
          {
              ElapsedMs?: number;
              ErrorMessage?: string;
              Phase: string;
              ProviderName?: string;
              Results?: SearchResultItem[];
          },
      >