Skip to main content

Global Search

Global search asks every registered resource for results and returns at most 20 items.

It exists so the app layout can search across resources without each feature building its own search endpoint.

Start with searchable fields and modelTitle(). Override the resource search methods only when the default result query or result node is not enough.

qore()->setIsGlobalSearchEnabled(true);

On a resource, override the global search methods when the defaults are not enough:

  • isGlobalSearchEnabled()
  • getGlobalSearchFields()
  • globalSearchNode(Model $model)
  • globalSearchResult(Model $model)

Use searchable fields and eager loaders on the resource to keep search fast and predictable.