Applies to v1.3.18

ESRA — Data Sources

A source is one governed searchable database. Modeling a source is the work of describing what it contains in business terms, which of its tables or views are searchable, and which of their columns may be searched, returned, filtered, or never seen at all.

Requires ESRA_DATA_MANAGE to create or edit; ESRA_DATA_READ to view.


Working in the Portal

ESRA & Data → Data sources. The grid carries identity, provider, selection mode, one status cell (lifecycle, health, enablement and entity count together). Selecting a row shows the source's summary beside the grid: its key facts, the proposed next step, its actions — edit, test, enable or disable, publish or unpublish, delete — and Open source; the name or a double-click opens it too. A disabled action says why in its tooltip.

New source opens Add a data source, a wizard on its own page with a step list and a running summary of what you have chosen. It has seven steps — Identity, Connection (whose Save and test moves on to the test), Verify, Structure, Columns, Describe and Review — and, when you choose more than one relation, an eighth, Mapping, described below. You can return to any step you have completed; Create source on the last step creates it and opens it in the editor. It reads the database's own catalog rather than asking the operator to retype it — relations, columns, their types, primary keys and existing full-text indexes — and proposes a mapping from what it finds: which column is the record key, which is the title, which is a business timestamp, and which columns are worth searching.

It does not propose which columns are filterable or restricted. Both are governance decisions, so they stay the operator's to make, on the Columns step, with the consequence stated.

The chosen relations become one set of fields (see Fields and bindings). A column name is a field, and relations that share it share the field. Each field's type is proposed from the column's type. The first relation to have a column decides its field's settings. When a relation lacks a column another one has, the Mapping step shows that field as Not set for it, and the wizard does not go on until you choose a column or a value for each. Set the rest to null answers every remaining row of an entity at once.

The last substantive step, Describe, before Review, is selection metadata — the business description, usage and exclusion guidance, domain tags, content languages and example prompts that are the only source data a selection prompt ever sees. Ceilings and result governance are not part of the wizard at all: they are configured afterward, on the Ceilings and Result governance tabs of the source editor.

Save and test on the Connection step creates the source and its connection, because the steps after it read the schema through that connection. Everything collected after it — the relations and their mapping, and the selection metadata — is applied together at the end. A wizard abandoned after Save and test therefore leaves an unpublished source with its connection and no schema, which you can open from the source grid to finish or delete.

A source that is serving cannot be edited. A published, enabled source is what the runtime is serving, so editing it in place would change what live audiences search with nothing recording that it happened. Publish is replaced by Unpublish on a published source, and Edit source is disabled with the reason on it, on the row, in the summary and in the source page's header. Test connection stays available throughout — probing is operational, not configuration.

There are two ways to stop a source serving, and the tooltips name both.

Unpublish returns the source to draft, at which point it edits normally and can be published again. It is refused while a published exposure still reaches the source, and says which one — which is precisely the situation you are in when a source in real use turns out to need a correction.

Disable is the way through that. A disabled source is dropped from every scope resolution, so it reaches no caller and its configuration is editable again for the same reason a draft's is. The editor says the corrections are not live, because they are not: they take effect when you enable the source again, which is the explicit act that puts it back in front of callers. The exposures that bind it are never touched, so nothing has to be republished.

Opening a source shows its own page, read-only, with a tab for each of the seven faces of a source: Overview, Selection metadata, Connection, Ceilings, Result governance, Fields and Searchable entities — plus Sharing on a source the platform owns, which says which tenants may use it. A platform source shared with your tenant shows no Connection tab: its connection stays with the platform administrator. The page's header carries the source's actions. Edit source opens the editor, a full page with the same tabs. Every field carries inline help stating what it means and what values are reasonable.

Saving is one action. Every change across every tab — including adding a field, binding it or removing an entity — is staged, and each tab holding unsaved changes is marked. Save changes in the save bar at the foot of the editor commits them together, and Cancel discards all of it. The one exception is Sharing, which applies each change when you make it. Underneath, the save applies only what changed, so an unrelated save never rewrites a connection whose secret bindings another administrator may have changed.

The overview, selection metadata, connection and ceilings are each saved on their own. The fields, the searchable entities with their bindings and settings, and the result governance are saved together, as one change that is applied whole or not at all. They belong together: a binding names a field, a snippet or grouping column must be bound, and governance names fields. If the server refuses that save, it lists every problem and changes none of them, so a source is never left with a binding to a missing field, a setting naming an unbound column, or governance naming a field that is not there. A source can still be incomplete, for example with a field not yet bound everywhere; publishing then says what is missing. If one part of a save fails, the message names it.

Field weights are chosen as four named bands — highest, high, normal, lowest — rather than as a decimal. A source that already stores a non-standard weight keeps it, and shows it verbatim rather than rounded into a band.

Credentials are bound by choosing an existing secret, never by typing an identifier. The picker lists name and identity only; no secret value is returned by any Portal endpoint. Creating or rotating the secret itself remains SECURITY_MANAGE work on the secret store screen.

A source created from an AISI index

When AISI is enabled, From an AISI index on the Sources screen creates a source that reads one AISI index. The same dialog opens from Use in ESRA on AISI's Indexes screen. Choose a provisioned index, then give the source a name and a business description. ESRA reads the index as the reader principal configured on it, bound by reference: the secret is never copied.

  • MongoDB, and Elasticsearch with basic authentication: also choose the secret holding the reader's user name.
  • An index with no reader bound: choose the reader's password or API key.

The source starts as a draft with a small result profile:

  • returned: title, timestamp, the link to the original and the document reference;
  • not returned: the body, which is still searched and is what passages are cut from;
  • declared but not returned: every other column, which you can switch on.

On an Elasticsearch or OpenSearch index, the entity's text-search configuration is The index's own analyzer. ESRA names no analyzer in its queries, so each field is searched with the analyzer it was indexed with. When the index is rebuilt with a different analyzer, search keeps working throughout and follows the new one after the switch, without any change to the source. Only Elasticsearch and OpenSearch accept this setting; on another engine it blocks publication.

The source gets one field per index column, each bound to its column.

What the index decides:

  • the connection;
  • the entity's table and key;
  • the title, timestamp, snippet and grouping columns;
  • the text-search configuration;
  • which columns exist, their types and weights, and which are searchable.

The editor shows these locked, with the reason in each tooltip, and the server refuses a change to any of them.

What you decide:

  • the fields — their names, descriptions and types;
  • which fields are returned, and which can be filtered;
  • the entity's name and limits;
  • everything about who may search the source.

A field may bind only one of the index's columns, and the columns the index searches must stay bound to searchable fields.

The index is the access boundary. AISI does not record who may open each document at the storage, so anyone who can reach a capability over the source can read every document in the index. Narrow that with the capability's access and, on Result governance, record conditions over the index's fields, such as its path or container. See Record-level security.

When the index changes. The source shows which index it follows. If the index's shape changes, the source shows an AISI_SCHEMA_DRIFT advisory listing what no longer matches. Drift covers:

  • a bound column that is gone, or whose type the field can no longer hold;
  • a changed weight;
  • a searched set that no longer matches the index;
  • a choice field whose values changed, so a new or removed value never reaches callers silently.

A field bound to an index column takes its allowed values from the index: an AISI Choice field's values, and none for any other column. They are shown read-only, labelled From the AISI index; change them on the index, then update the source. A description is not copied from the index — an AISI field's instructions are written for the model that classifies documents, not for one searching them — so describe each filterable field yourself.

Update from AISI applies the index's current shape and keeps your choices about fields. A column the index gains is listed as available and is not exposed until you bind a field to it. If the index dropped a column a field binds, the update is refused and names that field: rebind it or remove it first. A column whose values a model writes needs a confirmation before a record filter may use it. Like any edit, an update needs the source to be in draft or disabled.

Unlink keeps every current value, allowed values included, and turns the source into an ordinary one: editable in full, and no longer compared with the index.

Authority

Every control is gated individually. A holder with ESRA_DATA_READ can open any source and read every tab; every write action is disabled with the missing role named in its tooltip, rather than the screen quietly omitting the functionality.


Identity and Lifecycle

Field Meaning
Name tenant-unique
Provider type PostgreSql, SqlServer, MySql, Elasticsearch, MongoDb, or Oracle
Selection mode Mandatory, Optional, PolicyForced, Disabled
Lifecycle state Draft, Published, Retired
Enabled an operational kill switch, independent of lifecycle
Priority breaks ties in ranking and in truncation of the selected set
Environment, tags free-form operational grouping

Disabled at source level is absolute — no capability and no exposure can override it upward.


Connection

The connection record never contains credentials. Its shape depends on the provider type — there are three:

  • ADO/SQL — PostgreSQL, SQL Server, MySQL/MariaDB and Oracle. A connection-string template plus references to secrets resolved per use through the platform secret store, described below.
  • HTTP — Elasticsearch/OpenSearch, reached over REST rather than a database driver. A credential-free base URL (embedded userinfo such as https://user:pass@host is rejected) plus an authentication mode — API key or HTTP basic, each resolved from a secret — a connect timeout, a request timeout, TLS requirement and a per-host connection-pool ceiling.
  • MongoDB — reached over the native binary wire protocol rather than ADO or REST. A credential-free mongodb:// or mongodb+srv:// connection-string template, a username/password secret pair, an authentication database (admin by default, since MongoDB credentials are commonly stored separately from the target database), the target database name, an optional replica set name, a configurable read preference (default SecondaryPreferred, to keep search load off the primary), connect and server-selection timeouts, a per-query execution-time budget and TLS requirement.

The ADO/SQL shape:

Field Default Notes
Connection string template — credential-free; placeholders for username and password; entered as host, port, database and attributes (Entering A SQL Connection)
Username / password secret — secret-store references; creating or rotating them requires SECURITY_MANAGE
Connect timeout 15 s
Command timeout 30 s the connection string's default only; a search is bounded by the source limit's command timeout (15 s), which is what is applied server-side — statement_timeout on PostgreSQL
Require read-only on
Require TLS on
Max pool size 10

Every host in the composed connection string, base URL or Mongo connection string is validated against the platform's outbound host allowlist before a connection is opened — the same control that governs audit delivery targets. A source pointing at a host that is not allowlisted for this tenant cannot connect, and the failure names the host, not the credential.

The database principal must be read-only. ESRA never issues DDL or DML against an external source. On SQL Server this is load-bearing rather than advisory — the engine has no session-level read-only transaction — so the connection test attempts a trivial write inside a rolled-back transaction and fails if it succeeds. This "Require read-only" field and the write-probe test apply to the ADO/SQL providers; MongoDB has no equivalent session-level concept either, so its read-only guarantee is instead a fixed, non-configurable ReadConcern.Majority applied to every read.

Test connection

Bounded, audited, and never echoes the connection string. It reports: reachability, whether the configured relation exists and is visible to the principal, whether a suitable full-text index is present, whether the text-search configuration exists, and whether the principal is genuinely read-only.


Transaction isolation — SQL Server only

ESRA's reads run inside a transaction, and which isolation level that transaction uses is configured per source rather than detected.

Mode Behavior Requires
Read committed (default) brief shared locks; can block a writer on a heavily contended table nothing
Snapshot no shared locks — an ESRA read is invisible to the rest of the workload ALTER DATABASE … SET ALLOW_SNAPSHOT_ISOLATION ON, and row versions in tempdb

ALLOW_SNAPSHOT_ISOLATION is off by default on SQL Server, which is why read committed is the default here: it is the mode that works against an untouched database without its owner enabling anything.

Choosing snapshot against a database that forbids it fails, with the classification SNAPSHOT_ISOLATION_UNAVAILABLE and a connection test naming both remedies. It does not quietly fall back: taking shared locks on a production database is the database owner's decision. The connection test does detect the database's setting, but only to advise: a source on read committed against a database that permits snapshot is told so, once, where the operator is already looking.

ReadUncommitted is not offered: it would let ESRA hand an AI client a row that is subsequently rolled back.

The setting is hidden for every other provider type — PostgreSQL, MySQL/MariaDB, Elasticsearch, MongoDB and Oracle. PostgreSQL's MVCC already guarantees readers never block writers, so there is nothing to choose there; the non-relational and non-ADO providers have no comparable session-level isolation concept to configure either.


Selection Metadata

This is the only source data that ever reaches a source-selection prompt. It is business language, by design: the model choosing sources never sees a schema, a relation name, a column, a host or a credential.

Field Purpose
Business description what this source contains, in the language of the business
Usage guidance when to prefer it
Exclusion guidance when not to use it — often more valuable than usage guidance
Domain tags contracts, hr, incidents, …
Languages content languages, BCP-47
Example prompts questions this source answers well
Freshness expectation "updated nightly", "real time"
Selection hints free-text steer for the selector

Search Mappings

A source exposes one or more search mappings — each one a governed searchable entity backed by a table or, preferably, a view.

Field Notes
Name, description business-facing; the description is what the planner sees
Relation name table or view; resolved by id from configuration, never from model output
Record key field stable identity of a record
Title field display label
Business timestamp field the result timestamp, and the order of recent queries, which return the newest matches first; an entity without one is never searched with recent
Record URL template optional deep link, returned only when the source permits record references
Text-search configuration e.g. english, italian — the analyzer used at query time
Ranking profile selects the normalization flags applied to the native rank
Max result count server-side row cap; default 50. A lower cap leaves the ranking fewer candidates and cuts more queries short
Snippet rules snippet field, max fragments (1–10, default 3), max fragment length (32–4 000 characters, default 400), whether to use native snippets
Document vector column PostgreSQL only: a stored tsvector column to search and rank on (see below)
Document grouping for rows that are parts of longer documents: the column the parts share and the column that orders them

Prefer a view over a table. Complex joins, computed columns and pre-applied business filters belong in a governed database view maintained by the DBA — not in dynamically generated SQL. ESRA never generates a join.

A stored document vector on PostgreSQL

By default ESRA builds an entity's PostgreSQL search vector from its searchable columns and their weights on every query. An expression index over the same expression lets PostgreSQL find the matches quickly, but ranking them still reads every matching row's text. On a large table, a common word matches tens of thousands of rows, and the query runs into its command timeout.

Name a stored tsvector column in Document vector column, and ESRA searches and ranks on it instead, which keeps queries on a large table well inside their timeout. The column and its index are your DBA's; a generated column keeps the vector current without any change to how rows are written:

ALTER TABLE documents ADD COLUMN search_vector tsvector GENERATED ALWAYS AS (
  setweight(to_tsvector('english', coalesce(title, '')), 'A') ||
  setweight(to_tsvector('english', coalesce(body, '')), 'D')) STORED;
CREATE INDEX ix_documents_search_vector ON documents USING gin (search_vector);

With a column named, the vector is the column's: the searchable columns' weights no longer apply to search, and the columns still provide fragments. The health probe marks the source degraded when the column is missing or is not a tsvector, and adds an advisory when it has no GIN or GiST index. The field is not offered on other engines, nor on an entity of a source created from an AISI index, which has its own index.

Documents stored as parts

Some tables hold long documents split into parts, one row per part — the indexes AISI writes are built that way. Set the entity's document grouping column (the column every part of one document shares) and its part order column (the column that puts the parts in order), and ESRA treats the parts as the document they are:

  • Results show each document once. When several parts of one document match, the result is the best-matching part — its fragments first — and it reports how many parts matched (matchedParts). A search for ten results returns ten documents rather than one long document ten times.
  • Fetching a result returns the whole document, its parts joined in order, in the same windows of text as any other fetch. The source's record filter applies to every part: a part the caller may not read is not part of the document they receive.

The grouping column must be returnable and not restricted, because ESRA reads its value back from every result; the order column must not be restricted. Set both or neither. Neither column can be removed, and the grouping column cannot be made unreturnable or restricted, until you clear the grouping. A source whose allowlist of returned fields leaves out the grouping column shows each part as its own result.

Fragments

Every result carries one or more fragments: short passages of the record, so the agent calling ESRA can see why it matched without fetching it. They are also what the reranking model scores and what a grounded answer quotes, so they are worth getting right.

A fragment is cut from one column, the entity's snippet field, around the words that matched. Leave the snippet field on Automatic and ESRA uses the lowest-weighted searchable column that is not the title — the body, on any entity read from the database — and the editor names the column Automatic resolved to. Choose a column yourself when the body is not where the matched text lives, for example a summary column. Only searchable, non-restricted columns can be chosen, and a column that is the snippet field cannot be removed, made unsearchable or restricted until you choose another one or go back to Automatic.

Each fragment is at most max fragment length characters, and a result carries at most max fragments of them, in the order they appear in the record. Fragments are always plain text, on every engine.

Where they come from. With Use the engine's own snippets on, PostgreSQL, Elasticsearch/OpenSearch and MongoDB Atlas Search produce them with their own snippet function, on the snippet field only and within the entity's limits. On SQL Server, MySQL/MariaDB, Oracle and MongoDB in $text mode — and on every engine with the switch off — ESRA finds the matched words in the snippet field itself and cuts the passage around them, the same way on every engine. A match deep inside a long column is found wherever it is.

When a fragment is the start of the field. If none of the searched words appears in the snippet field as written, the fragment is the start of the field instead. That happens when the record matched on another column (the title, say), or matched only through the engine's stemming — a search for run matching ran. The esra_fragments_total metric counts how often each source falls back this way (Operations).

Adding an entity from the database

The Searchable entities tab of the source editor offers Read from the database beside Add entity. It asks the source's own catalog what it contains, lists the relations, and proposes a mapping for each one you pick — record key, title, business timestamp and the columns worth searching — exactly as the onboarding wizard does. Everything is editable before it is staged, and nothing is written until you save the source.

An imported relation meets the fields the source already has. A column with a field's name is bound to that field, and a column no field names becomes a new field. Each existing field the relation has no column for is Not set on it. Every other entity also shows each new field as Not set, because only you know what that field means for an entity that lacks the column.

Two things it will not do. It never proposes which columns are filterable or restricted: both are governance decisions. And it can only show what the connection's database principal may select from — so if a table you expect is missing, grant that principal read privilege on it, or on the catalog views, and read the structure again. An empty list is far more often a missing GRANT than an empty database.

The control is disabled, with the reason on it, when the source has no connection or its last probe found it unreachable.

All six external providers — PostgreSQL, SQL Server, MySQL/MariaDB, Elasticsearch/OpenSearch, MongoDB and Oracle — can be read this way, each against its own catalog (relations and columns for the SQL-shaped providers, indices and mappings for Elasticsearch, collections for MongoDB). Where a relation carries no full-text index, the list says so — and says what it costs on that engine, because it is not the same thing on every one of them. On PostgreSQL the relation is searchable and slow. On SQL Server, MySQL, MongoDB (in $text mode) and Oracle (absent Oracle Text licensing or an index) it cannot be searched at all: the entity models cleanly and every query against it fails until the engine-appropriate index exists. Neither blocks the choice; both are worth knowing before you make it.


Fields and bindings

A source has one set of fields, its logical schema, whatever each entity calls the columns behind them. Callers, the planning model, the allowlist, masking rules and the record filter all name these fields, never a column.

Each field has:

Setting Meaning
Name what callers use: a letter or underscore, then letters, digits or underscores
Description what the field holds, shown to callers and to ESRA's planning model beside a filterable field
Type Text, Number, Date, DateTime, Boolean or Identifier — what a filter value is compared as
Searchable searched wherever an entity binds the field to a column
Returnable may appear in a result's fields
Filterable may be used in a structured filter, with the listed operators — at least one is required
Allowed values for a Text or Identifier field, the values it holds and nothing else; empty means any value
Restricted never returned, never sent to a model, never filterable — excludes Returnable
Enabled a disabled field needs no binding and reaches nobody

Field-level governance is where most of the security of a source actually lives, and it is decided once per field. Two entities cannot disagree about whether the same field may leave ESRA.

Each entity binds every enabled field:

  • to one of its columns, with that column's search weight (0–1; on PostgreSQL it maps to the weight classes A–D);
  • or to a static value: a value of the field's type that every row of the entity carries. For example, an entity holding only invoices binds document_type to invoice.

A static value may be an explicit null, which matches no filter. An entity searches a field only where it binds a column, since a constant has nothing to match.

A save is refused while any entity leaves an enabled field unbound, and the refusal lists every gap at once. The fields and every entity's bindings are written together, so a field added for one entity cannot leave the others unbound. A source that has a gap shows ESRA_SOURCE_FIELD_UNMAPPED and cannot be published.

Types are checked against the columns. When ESRA can read a column's type, it refuses a binding the type cannot hold:

Field type Column types it binds
Text text, short text, identifier
Number numeric
Date, DateTime date or timestamp
Boolean boolean or numeric
Identifier identifier or short text

When the type cannot be read (the source is unreachable, or the engine cannot be introspected), the binding is saved and the source shows ESRA_SOURCE_BINDING_TYPE_UNVERIFIED until a later save can check it. On a relational source, binding a column the relation does not have is refused.

Fields that governance depends on are protected. While the record filter, the response allowlist or a masking rule names a field, it cannot be removed, renamed, disabled or given an incompatible type. Changing between Text and Identifier is allowed. See Security and governance.

A filterable field must permit at least one operator; the editor will not save one without. The operators are what callers are offered: a retrieval tool's filters argument lists each filterable field with its type and operators — Country (eq, in), invoice_date (date; gt) — and a caller filter using any other operator, or a value that is not of the field's type, is refused before the call reaches a model. between is never offered to callers, because a caller's filter carries a single value; the planning model can still use it. A filterable field with no operator is reported on the source as ESRA_SOURCE_FILTERABLE_WITHOUT_OPERATORS and is left out of the tool schema until operators are chosen.

Describing a filter field and listing its values

A model filling a filter can only use what it is told. For each filterable field, the tool's filters description gives a caller its operators, its description and, when the field has them, its allowed values — and ESRA's planning model is told the same, so a call with explicit filters and a call with only a prompt build filters from the same facts:

- doc_type (eq, in; one of: "INVOICE", "RECEIPT", "CONTRACT") — The kind of document, as classified at indexing.
- party (eq, startsWith) — The counterparty named on the document.

Write the description for a model deciding what to filter on: what the field holds and how its values read.

List the values of a field that holds a closed set — a document type, a status, a region. Up to 200, each up to 256 characters, no two differing only by letter case, in the order a caller should read them. Values come from you, never from the data: ESRA does not sample a column. Only Text and Identifier fields list values; a number, date or boolean is already constrained by its type, and changing a field to one of those clears its list.

With a list:

  • a caller's eq, ne or in value outside it is refused before any model is paid for, and the message lists the values, so the caller can correct in one retry; startsWith and the ranges are not checked;
  • a matching value is sent in your spelling whatever its letter case, so receipt finds rows stored as RECEIPT on every engine — the values you list must therefore be spelled as the data stores them;
  • a value the planning model invents is dropped from its query, which still runs — wider rather than lost — and the drop is recorded on the trace as filter_value_not_allowed.

Every value is sent, every time. A model shown part of a list picks the nearest value it can see — INVOICE for a receipt when RECEIPT was cut — which is valid, is not refused, and returns the wrong documents, so ESRA never shortens a list or a description. What a field costs is shown instead: its edit form says how many characters it adds to every caller's tool description, and an exposure's Effective scope shows the whole figure (see Capabilities and exposures).

When an exposure spans several sources, a field's descriptions are joined and its values merged. It is presented as one of its values only if every source lists values for it; if any source leaves it open, the values are shown as known values; others possible, and that source is searched with any value. A value one source does not list then simply finds nothing in that source.

In the Portal, the Fields tab lists the source's fields, with each one's type, its capabilities and what governs through it (record filter, allowlist, masking). Add field and the edit action open the same form. A field that governance names cannot be removed, renamed or disabled there, and its controls say why.

On the Searchable entities tab, each entity has a mapping grid with one row per enabled field. Each row is Not set, Source column or Static value:

  • Source column offers the entity's columns with their types: from the database when the relation can be read, and from the index on a source created from an AISI index. Otherwise you type the column name.
  • Static value takes a value of the field's type, with a null switch for "this entity has no such value". Dates use a date picker; a date and time is typed as ISO 8601 (2025-01-31T09:30:00Z).
  • A searchable field shows its weight where it is bound to a column. Where it is bound to a constant, the grid says it is not searched there.

Save stays disabled while any row is Not set. The footer gives the count and names the first few, and Set the rest to null on an entity answers all of its remaining rows at once. Rebinding a column that the entity's snippet, grouping or part-order setting names clears that setting, because those settings must name a bound column.

Changes to what the record filter compares are confirmed before saving. If a save would supply a field the record filter reads as a constant or null instead of a column, or would make the filter read a field whose values a model writes, the editor lists each change and asks first. A confirmed save is recorded in the audit log, as described in Security and governance.

Upgrading from 1.2. Sources created before fields existed are converted when the database migrator's apply command runs, as the installer does on every upgrade:

  • One field was created per distinct column name.
  • Where entities disagreed about a column, the narrower setting was kept: returned or filterable only if every entity allowed it, restricted if any entity restricted it.
  • Each entity binds its own column, and an explicit null where it had no such column — the same answer it gave before.
  • Every column the record filter names became a restricted field.

The upgrade output lists each of these decisions, source by source.

Any other way of applying the schema changes, such as a generated SQL script, stops with Refusing to drop esra_search_fields rather than lose them: run apply instead.

Generating fields from the entities. A source that has entities but no fields says so on the Fields tab. Generate from entities on the Fields tab rebuilds them:

  1. It reads each entity's relation from the database: its columns, their types, and which to search, as Read from the database proposes them. Where the structure cannot be read (a source that cannot be reached, or a relation the catalog does not list), it uses the columns the entity names in its settings: record key, title, timestamp, snippet, document group and part order, typed as text.
  2. It shows, before changing anything, where each entity's columns came from and the fields it would add.
  3. Add to the schema adds a field per column name not already a field, and binds each entity's columns to them. Bind a new field an entity has no column for to an explicit null (on by default) answers the rest, as the upgrade does.

It adds only what is missing: fields you have configured, bindings already set and entity settings stay as they are, so it can also fill the Not set rows of a source that has fields. No filter operator is proposed. Review the types, capabilities and operators on the Fields tab, then save the source. A published, enabled source must be disabled first, like any other edit.


Limits

Per-source ceilings that no capability or exposure can exceed: max queries per source, max terms per query, max filters per query, max rows per query, max candidates, max concurrency, max retries, command timeout.


Result Governance

Setting Effect
Allowed response fields the returnable allowlist, applied after every stage
Masking rules Full, PartialTail (keep last n), or Hash per field
Record filter structured conditions over logical fields, with values written or read from the caller's claims, applied in the query
Claim bindings which caller claim each binding reads, for a condition to compare with
Retention classification governs whether prompts and fragments may be captured in audit
Allow answer generation gates grounded answers for this source
Allow record references gates returning the record URL

Record-level filters

Result governance → Record filter builds the filter from conditions. Each condition is a field, an operator, and either a value or Caller's claim with a claim binding, grouped under All of these hold or Any of these holds:

All of these hold
  tenant_scope   equals       Caller's claim  tenant
  Any of these holds
    department   is one of    Caller's claim  departments
    visibility   equals       Value           public

The editor offers each field only the operators its type admits, and Save stays disabled until every condition is complete and at least one reads a claim. The server checks the same rules again, and publication checks them once more. The view shows the filter in words.

A missing claim is fail-closed. The query is not executed, the source is dropped from the invocation, and the response carries a source-unavailable warning. ESRA never substitutes a default and never omits a condition.

A free-text template written before structured conditions, and kept by the upgrade because conditions cannot express it, is shown read-only with a warning. It is still enforced. Replace with conditions starts a structured filter in its place; Security and governance explains what was converted and why.


Health

Sources are probed on a schedule, not on the readiness path. A failing optional source degrades a retrieval; it does not fail the Runtime.

Scope resolution excludes an unhealthy source, so a database that went away overnight drops out of scope at the next sweep, and its row says why, without anyone pressing Test connection. A probe that throws is an unhealthy source, not a failed sweep, so one broken source never prevents the others being checked. The sweep can be switched off for a deployment behind a connection-rate-limiting gateway; the Portal then shows when the probe last actually ran, rather than implying the health value is current.

State Cause
Healthy reachable, relation visible, index present, text-search configuration present
Degraded searchable, but something is misconfigured — a missing index, a missing text-search configuration, a document vector column that is missing or not a tsvector, or an index whose state could not be read
Unhealthy unreachable, relation missing, or permission denied
Disabled switched off by an administrator

An unhealthy source whose effective mode is Optional is dropped from the effective scope. An unhealthy Mandatory source is retained and handled by the mandatory-failure policy at execution time. Degraded gates nothing — not scope, not publication, not execution. It is what the operator is told, never what a caller can reach.

A full-text index still crawling is not degraded: on a corpus under continuous ingestion an index is catching up more often than not. The crawl is still reported, as an informational note on the entity, because results from it may be incomplete until it finishes. An index whose state could not be read stays degraded: that one is not known to be fine, and granting the connected principal metadata visibility on the table resolves it.

Which entity is at fault. A source's state is a roll-up of a probe per entity, and the connection test names the entities that produced it rather than reporting that at least one of them did. The Searchable entities tab carries the same answer where you can act on it: a warning triangle on the entity, a sentence saying what is wrong and whose job it is to fix — correcting a text-search configuration is a change on the entity, adding a full-text index is a change on a table ESRA does not own — and, where the engine can attribute it that precisely, a triangle on the individual columns. SQL Server can name the columns its index does not cover; a PostgreSQL index may be an expression over several columns, so there the finding names the relation and lists the entity's searchable columns as affected rather than blaming one of them.

Findings come from the last probe, so they appear without testing the connection — the scheduled sweep establishes them — and each probe replaces them entirely. If a finding disappears after a sweep, it was fixed.