ReadonlyAppliesWhether 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.
ProtectedconfigConfig from the SearchProvider metadata record, set during Initialize()
ReadonlyConsumesReads the scope's Typesense external-index rows (see BaseSearchProvider.ConsumesLaneKinds).
ReadonlyResultsWhether 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.
ReadonlySourceWhich search source this provider represents
Get the metadata provider used by this search provider, falling back to the global default.
Set the metadata provider used by this search provider for entity lookups.
Check and cache whether this provider is operational. Called after Initialize(). Override for providers that need to verify external dependencies (e.g., vector indexes exist, API keys are valid).
The default implementation returns true (always available).
The user context for availability checks
Initialize the provider with configuration from the SearchProvider entity. Called once during SearchEngine.Config(). Override to perform provider-specific setup (e.g., connecting to external APIs using credentials).
Configuration from the SearchProvider metadata record
The user context for initialization
Whether this provider is currently available (configured and operational). The SearchEngine will skip providers that return false.
ProtectedScopedThe scope's external-index rows of indexType that name an index, or undefined when the search
is unscoped (ExternalIndexes absent). An EMPTY array means the scope gives this provider no
index: search nothing. A provider falls back to its configured default index only on undefined.
The per-scope constraints passed to Search, if any
The IndexType this provider serves (e.g. 'Elasticsearch')
Execute a search and return result items with scores.
When scopeConstraints is provided, the provider MUST:
MetadataFilter / ExtraFilter / UserSearchString /
FolderPath values as native filters.contextUser cannot see.scopeConstraints.QueryTransforms when a per-provider rewrite is supplied —
look up by your SourceType or provider-specific key and use that string in place
of the raw query.When scopeConstraints is undefined, the provider runs unconstrained (backward
compatible pre-scope behavior). Inside scopeConstraints, a lane list that is
undefined means unscoped too, but a DEFINED, EMPTY list means the scope gives this
provider nothing: return no results without querying — never fall back to "everything"
or to a default index (see the field docs on ScopeConstraints). The engine does not call a
provider whose ConsumesLaneKinds are all empty in a scope, but a provider reading several
lane kinds still receives [] for the ones a scope leaves empty.
The search query text
Maximum number of results to retrieve
Optional filters to narrow results
The user performing the search
OptionalscopeConstraints: ScopeConstraintsOptional per-scope constraint set, pre-rendered with SearchContext values
Scored result items from this provider
StaticGetEnumerate every search provider currently registered with ClassFactory under
BaseSearchProvider. Designed for the SearchScope form's provider dropdown
(P5.5) — populates the dropdown from this single call rather than hardcoding
a list, so any ClassFactory-registered provider (including third-party ones)
shows up automatically.
Each entry includes the driver-class registration key (writes into
SearchProvider.DriverClass) and the SourceType the provider implements.
Sorted by DriverClass for stable UI ordering.
Abstract base class for search providers. Subclasses must be registered with @RegisterClass(BaseSearchProvider, 'DriverClassName') to be discoverable by the SearchEngine.
Lifecycle: