Skip to content

Search Kit

Introduction

The Search Kit Extension is a graphical search query composer and display editor.

The architecture uses APIv4 to run the queries, and AngularJS for the UI.

Features

Search Kit meets a number of developer needs as searches can:

  • be saved and exported,
  • have any number of unique displays on their own,
  • be embedded in many places such as dashboards, contact screen or individual URLs,
  • have exposed filters for easy filtering,
  • be the basis of a Smart Group,
  • be used for your own entities custom created for your website,
  • be packaged in an extension using Managed Entities.

Data Model

The main entity in Search Kit is the SavedSearch, which contains the APIv4 parameters needed for running the query.

Displays

Each SavedSearch can have zero or more Displays, which are stored in the DB as the SearchDisplay entity, and rendered on the page as AngularJS components.

Even if the SavedSearch has no displays, the results are still viewable via the autogenerated default display, which is fetched via \Civi\Api4\SearchDisplay::getDefault().

Displays can be embedded in many different placements via Afform.

Diagram of Searchkit Formbuilder