Set Text Filter Command

Syntax

The syntax for the set text filter command is:

setTextFilter(<filterQuery>)

There are no defaults for the setTextFilter command. Lucene escaping applies to this command. Characters that may need to be escaped include: +-&|!(){}[]^"~*?:\. Special characters only need to be escaped if their special meaning was not intended. Regular argument escaping must be applied after Lucene escaping.

Function

The set text filter command adds the text filter, replacing any existing text filters, and then it calls clearAllPaging().

Example - Using the set text filter command

This set text filter command adds a new text filter for zoology,
and removes the text filter for anthropology,
and it resets paging on the ContentType facet field and page number:

  s.pn=3&s.ff=ContentType,or,2,15&s.fq=anthropology&s.cmd=setTextFilter(zoology)

Try It