or( )


Creates a filter for matching documents that meet the condition of any of the specified filters.

The or() function joins WixSearchFilters with an inclusive or condition and creates another WixSearchFilter. A search with an or() returns all the documents that match the condition of any of the filters.

Method Declaration
Copy
function or(filters: Array<WixSearchFilter>): WixSearchFilter;
Method Parameters
filtersArray<WixSearchFilter>Required

One or more search filters.

Returns
Return Type:WixSearchFilter
JavaScript
import wixSearch from "wix-search"; // ... const orFilter = wixSearch.filter().or(myFilter1, myFilter2);
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?