query( )


Sets the search phrase to search for.

The query() function provides an alternate method for setting the search phrase for your search. Instead of setting the search phrase directly as a parameter of the search() function, you can set the search phrase using the query() function chained to a WixSearchBuilder.

Setting the search phrase with query() allows you to build searches dynamically. For example, you could use a different search phrase depending on whether a specific condition is met.

Method Declaration
Copy
Method Parameters
phrasestringRequired

The phrase to run the search on.

Returns
Return Type:WixSearchBuilder
Was this helpful?
Yes
No