Search Parameter Tuning
The FHIR specification describes a rich set of default Search Parameters for every resource type, and these are all enabled by default. Every enabled search parameter means additional processing work when a resource is written, so disabling search parameters that are not used can have a significant impact on write performance.
For example, out of the box, every time a Patient resource is written, distinct search parameters are created to index:
Having all of the indexes above can be useful if you are trying to build a general-purpose system that will support searching by any combination of a wide range of demographics.
On the other hand, if you are implementing one or more Implementation Guides that only mandate support for a specific limited number of search parameters, indexing all of these fields adds processing time and index disk space every time a resource is written.
The performance and storage space difference can be dramatic when you disable unnecessary search parameters. Tuning is highly recommended.
Search Parameters are controlled in your repository using SearchParameter resources. A simple search can be used to determine which search parameters are active, e.g.:
You can disable unwanted Search Parameters by updating these resources and setting the status to
By default, the system will automatically initalize your repository with all Search Parameters defined in the base FHIR specification when you create a new FHIR repository.
If you wish to automatically adjust this seeding, you can do this using the Search Parameter Seeding settings. Note that it is fine to adjust these after the repository has been created, even if the default set of search parameters has already been created.
Patterns for both enabling and disabling search parameters take the forms:
[resourceType]:[paramName](One specific search parameter for one resource type) – e.g. "Practitioner:name"
*:[paramName](any search parameters with the given name across all resource types) – e.g. "*:name"
[resourceType]:*(all search parameters for the given resource type) – e.g. "Practitioner:*"
*(all search parameters for all resource types)
Multiple patterns may be specified using either a newline or a comma to separate the values.
Enable patterns take precedence over disable patterns, so for example if you specify a disable pattern of
Patient:* and an enable pattern of
Patient:name, Patient.identifier then all search parameters for the Patient resource will be disabled except for name and identifier.
Note that there are a small number of search parameters that can not be disabled as they are required for routine operation of the CDR. These include
*:url (used by various parts of the validator and terminollogy services) and
Subscription:* (used by the Subscription module). The system will not permit these to be disabled and will automatically ignore any attempts to disable them through disable patterns.
The following example shows seeding settings appropriate for a repository being used to support the CARIN Consumer Directed Payer Data Exchange (CARIN IG for Blue Button®) Implementation Guide.
Patient:* Practitioner:* ExplanationOfBenefit:* Coverage:* Organization:*
Patient:identifier Coverage:identifier ExplanationOfBenefit:identifier ExplanationOfBenefit:patient ExplanationOfBenefit:type ExplanationOfBenefit:service-date ExplanationOfBenefit:claim ExplanationOfBenefit:coverage ExplanationOfBenefit:encounter ExplanationOfBenefit:enterer ExplanationOfBenefit:facility ExplanationOfBenefit:provider ExplanationOfBenefit:payee