Refines a search builder to only search for documents of the specified document type.
The document type can be one of the following:
"Site/Pages"
"Blog/Posts"
"Bookings/Services"
"Forum/Content"
"Stores/Products"
Setting the document type to Site/Pages
:
documentType
to the corresponding app collection (for example, "Stores/Products"
).documentType
is set to "Site/Pages"
, you cannot filter, sort, or apply facets to your search results.title
and description
fields are searched.Setting the document type to a Wix app:
documentType
to "Stores/Products"
restricts the search to products stored in the "Stores/Products"
collection, which are also displayed in your site's Product Page.documentType
.If the documentType
is not specified, it defaults to "Site/Pages"
.
Note that you cannot chain multiple documentType()
functions to search for multiple document types.
Only the last specified document type will be searched.
Deprecation note: "Forum/Posts"
is no longer supported. Use "Forum/Content"
instead.
The document type to search in.