Skip to main content

Global Search

The platform exposes a global search bar that lets users find objects across the entire tenant. For each indexed object, the platform stores all non-numeric field values and the names of singly-related objects. Two class properties control how this search behaves: generalSearchClasses determines the scope of the search, and indexed controls whether objects of a specific class appear in results at all.

generalSearchClasses​

Declared on the index class (the CONFIG class in index.json). It sets the classes the app's global search bar searches — only objects that have at least one of the listed classes are returned.

Only one class in the tenant collection may declare generalSearchClasses.

The value is an array of qualified names, with OR semantics: an object matches if it has any of the listed classes.

A single class — all objects in the database:

index.json
{
"version": 1,
"class": "my-project.index",
"kind": "CONFIG",
"generalSearchClasses": ["commons.item"],
"imports": ["my-project.order", "my-project.supplier"]
}

Several classes — persons, companies, and agreements only:

index.json
{
"version": 1,
"class": "my-project.index",
"kind": "CONFIG",
"generalSearchClasses": ["commons.entity", "commons.agreement"],
"imports": ["my-project.order", "my-project.supplier"]
}

Common values and their scope:

ValueSearch scope
commons.itemAll objects in the database
commons.entityEntity-like objects only (persons and companies)
commons.agreementAgreement objects

When combining classes, ancestor coverage applies: if class A is an ancestor of class B in the inheritance chain, listing class A already covers all objects of class B. For example, adding both commons.entity and commons.person is redundant — commons.entity already covers persons.

Use commons.item for platforms where users search across all objects. Use a targeted array for apps where the search bar should only surface specific categories.

indexed​

Declared on individual classes. Controls whether objects of that class appear in global search results.

ValueEffect
true (default)Objects of this class are included in search results
falseObjects of this class are excluded from search results

Use indexed: false for classes whose content users would never search for and that occur in large volumes — for example, individual invoice lines. Excluding high-volume classes reduces the amount of data stored in the search index.

invoiceLine.json
{
"version": 1,
"class": "my-project.invoiceLine",
"kind": "BASIC",
"inherits": "commons.item",
"indexed": false
}
warning

Setting indexed: false also disables search-based relation lookups for that class. A relation field with editBehavior: "SEARCH" will not work for classes with indexed: false — use DROPDOWN or CHECKBOX instead. See Layouts.

Relationship between the two​

generalSearchClasses defines the outer boundary — the set of classes that the global search considers at all. indexed: false is an opt-out within that boundary: even if a class falls within the search scope, setting indexed: false removes it from results.

Example: a trade platform sets generalSearchClasses: ["commons.item"] so users can search all objects. The my-project.priceList class is within that scope but declares indexed: false — price lists never appear in search results, even though other objects do.