Performs a full-text search across all entities that have FullTextSearchEnabled=true in their metadata. Uses the database-native full-text search capabilities (SQL Server FREETEXT via CodeGen-generated functions, PostgreSQL tsvector/GIN indexes, etc.) through the existing RunView + UserSearchString infrastructure.
Search parameters including the search text and optional entity name filter
OptionalcontextUser: UserInfoOptional user context for permissions and row-level security
Array of search results grouped by entity, with title, snippet, and relevance score
OptionalcontextUser: UserInfoOptionalcontextUser: UserInfoOptionalRunExecutes multiple RunView requests with smart cache checking. For each view with cacheStatus provided, the server checks if the cached data is still current before executing the full query. This reduces unnecessary data transfer when cached data is valid.
Array of view parameters with optional cache status for each
OptionalcontextUser: UserInfoOptional user context for permissions
Response containing status and fresh data only for stale caches
Batch form of SearchEntity. Runs the per-entity ranking against
many entities in one call. Transports as a single JSON payload in both
directions over GraphQL when invoked through GraphQLDataProvider, so
N entity searches cost one round-trip instead of N.
Server-side providers fan the call out via Promise.all to independent
SearchEntity invocations — each entity's lexical pass, semantic pass,
blending, and permission filter run independently, and the per-entity
result arrays come back aligned by input order.
Use this whenever an agent or workflow needs ranked results from more than one entity for the same user request (e.g., "find anything relevant to 'overdue payments'" across Invoices, Customers, and Notes).
One SearchEntityParams per target entity.
Array of result arrays, aligned by input order — result[i]
holds the ranked matches for params[i].
Ranked search over one entity's records, blending lexical name/text-field matching with semantic embedding cosine. Results are post-filtered by the caller's row-level read permissions on that entity.
IMetadataProvider| Method | Purpose |
|---|---|
| EntityByName / EntityByID | Look up an entity definition by name or ID. Deterministic, not ranked, returns EntityInfo. |
| FullTextSearch | Server-side text search across one or many entities using each entity's UserSearchString rule (DB-level LIKE / FTS). Returns flat per-entity result groups, no semantic ranking. |
SearchEntity (this) |
Hybrid lexical-plus-semantic ranking of records inside one entity, backed by an EntityDocument-driven vector index. Use when you need "the N most relevant records of this entity for the user's free-text request". |
| SearchEntities | Batch form — runs SearchEntity over many entities in one round-trip. |
Semantic ranking requires an Active EntityDocument of type Search
registered for the target entity (see /metadata/entity-documents/ for
the seeded one against MJ: Entities); without it, mode: 'semantic'
returns no rows and mode: 'hybrid' degrades to lexical-only.
Target entity name, search text, and optional ranking knobs.
Ranked EntitySearchResult[] — descending by score, sliced to topK.
Interface for providers that execute views. Supports parameterized view execution with filtering and pagination. Views are the primary way to query entity data in MemberJunction.