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 DataClass properties control how this search behaves: generalSearchType determines the scope of the search, and indexed controls whether objects of a specific class appear in results at all.

generalSearchType

Declared on the index class (the NONE-typed class in index.json). It sets the target type for the app's global search bar — only objects whose type set includes at least one of the specified types are returned.

Only one class in the tenant collection may declare generalSearchType.

The value is a single TypeFQN or an array of TypeFQNs. When an array is given, the search uses OR semantics: an object matches if its type set includes any of the listed types.

Single type — all objects in the database:

index.json
{
"class": "my-project.index",
"type": "NONE",
"generalSearchType": "commons.item",
"imports": ["my-project.order", "my-project.supplier"]
}

Array of types — persons, companies, and agreements only:

index.json
{
"class": "my-project.index",
"type": "NONE",
"generalSearchType": ["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 types only (persons and companies)
commons.agreementAgreement objects

When combining types in an array, ancestor coverage applies: if type A is an ancestor of type B in the inheritance chain, adding type A already implicitly covers all objects of type 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 object types. Use a targeted array for apps where the search bar should only surface specific categories.

indexed

Declared on individual DataClasses. 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
{
"class": "my-project.invoiceLine",
"type": "BASIC",
"inherits": "commons.item",
"indexed": false
}
warning

Setting indexed: false also disables search-based relation lookups for that type. 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

generalSearchType defines the outer boundary — the set of types 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 generalSearchType: "commons.item" so users can search all object types. 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.