Member Junction
    Preparing search index...

    Provides file-level search across MJ File Storage accounts using each provider's native SearchFiles() API. Only accounts with IncludeInGlobalSearch=true on active providers with SupportsSearch=true are searched.

    Nothing is snapshotted. The searchable accounts are read at search time from FileStorageEngine.Instance.AccountsWithProviders (a BaseEngine cache kept current by entity events), and account permissions are evaluated per call, for the searching user, through StorageAccessEvaluator from @memberjunction/storage — so a grant or revocation applies to the next search, and which user configured the engine first does not matter. The evaluator reads the permission rows with the MJ system user and decides for the caller: an account with no permission rows is open to everyone (the current product rule, kept in one place in the evaluator); otherwise the user needs CanRead through an Everyone, Role or User row. A failed evaluation searches nothing.

    The provider's own check is push-down only: SearchEngine's late permission filter re-checks every storage-file hit (its account, for the user, against this provider's stamped ProviderId).

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    AppliesLaneExtraFilter: boolean = false

    Whether this provider applies each entity lane's rendered ExtraFilter itself, in the RunView that reads the entity — so the engine need not re-check its hits against that lane bound. Only EntitySearchProvider sets it. Every other provider's hits for an entity with a lane ExtraFilter are re-checked by the engine, as the user, with PK IN (...) AND (<ExtraFilter>).

    Like ResultsAreRowsOfLabelledEntity, it is read from the provider the engine stamped on the result (ProviderId), never from a label, and never covers a promoted content-item hit (the filter was applied to the content item, not to the origin record it now names). A subclass inherits it; a subclass that changes Search so the lane ExtraFilter is no longer applied must override it to false.

    config: SearchProviderConfig = null

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

    ConsumesLaneKinds: readonly LaneKind[] = ...

    Reads the scope's storage-account lanes (see BaseSearchProvider.ConsumesLaneKinds).

    ResultsAreRowsOfLabelledEntity: boolean = false

    Whether every result this provider returns is a row of the MJ entity its EntityName names, with RecordID that row's primary key, read from that entity through RunView as the searching user — so the entity's permissions and the user's row filters were applied when the row was read.

    The engine's permission pass trusts such results without re-reading them when no row filter applies (the hot path of the entity and full-text lanes). It verifies every other result with one PK IN (...) read per labelled entity, because a vector or external-index hit's EntityName is whatever the index says (an index or collection name, a metadata key) and its RecordID is the document's own id.

    Trust follows the provider instance the engine stamped on the result (SearchResultItem.ProviderId), never the SourceType a provider declares or stamps: SearchSource is a closed union, so any provider can call itself 'entity' or 'fulltext'. EntitySearchProvider and FullTextSearchProvider set this. Leave it false (the default) unless your hits really come out of RunView against the labelled entity; set on any other provider, it lets whoever writes the index choose which entity's permissions apply. It never covers a hit the engine promoted from MJ: Content Items to its origin record (SearchResultItem.PromotedFromContentItemID): the provider never read that row.

    A subclass inherits this flag. A subclass that changes Search so its hits no longer come out of RunView against the labelled entity must override it to false.

    SourceType: SearchSource = 'storage'

    Which search source this provider represents

    Accessors

    Methods