Clear Search Command


The syntax for the clear search command is:


This command takes no arguments.


The clear search command calls clearAllTextQueries() clearAllSearchTerms() clearAllTextFilters() clearAllRangeFilters() clearAllFacetValueFilters() clearAllPaging(), resetting the search, but leaving all other parameters like params, page size and facet fields intact.

Example - Using the clear search command

This clear search command clears all search elements but leaves params page size and facet fields intact:,Book&s.fvf=ContentType,Book&s.fq=trade+economy&s.cmd=clearSearch()

Try It