Index contained resources
FHIR search parameters of type reference supports a concept called chaining.
This feature defaults to: Disabled
Parameter name: enable_index_contained_resource
Consider the following resources:
Patient resource:

Observation resource with reference to Patient:

Request: Search query for an Observation resource
With the Patient and Observation resources stored in your repository, the following search returns the Observation resource.

This works because of the chain, which is the dot notation followed by a second search parameter. This syntax means "find me any Observation resources where the subject reference links to a target resource where a search for name=Smith would match."
By default, chained searches only consider top-level resources. Consider the following Observation resource with a reference to a contained Patient.

The search given above will not return this Observation, because the contained resource has not been included in the search indexes. If the Index Contained Resources feature is enabled, indexes will be generated for the contained resources, and Observation/3 would be included in the search results.
Parent topic: Search parameter features