searchFields( )


Refines a search to include only certain fields.

The searchFields function refines a WixSearchBuilder to search only in the specified collection fields.

The title and description fields are searchable for all document types.

To find out which fields are searchable for other document types, see the following articles:

If searchFields() isn't called or is called without an argument, the search includes all searchable fields.

Method Declaration
Copy
Method Parameters
fieldsArray<string>Required

The fields to include in the search.

Returns
Return Type:WixSearchBuilder
Did this help?