[Search documents](https://en.wikipedia.org/wiki/Search_engine_indexing) are also modeled using [PDL](https://linkedin.github.io/rest.li/pdl_schema) explicitly.
In many ways, the model for a Document is very similar to an [Entity](entity.md) and [Relationship](relationship.md) model,
where each attribute/field contains a value that’s derived from various metadata aspects.
However, a search document is also allowed to have array type of attribute that contains only primitives or enum items.
This is because most full-text search engines supports membership testing against an array field, e.g. an array field containing all the terms used in a document.
One obvious use of the attributes is to perform search filtering, e.g. give me all the `User` whose first name or last name is similar to “Joe” and reports up to `userFoo`.
Since the document is also served as the main interface for the search API, the attributes can also be used to format the search snippet.
As a result, one may be tempted to add as many attributes as needed. This is acceptable as the underlying search engine is designed to index a large number of fields.
Below shows an example schema for the `User` search document. Note that:
3. Similar to `Entity`, all remaining fields are made `optional` to support partial updates.
4.`management` shows an example of a string array field.
5.`ownedDataset` shows an example on how a field can be derived from metadata [aspects](aspect.md) associated with other types of entity (in this case, `Dataset`).