Set Text Query Command


The syntax for the set text query command is:


There are no defaults for the setTextQuery 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.


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

Example - Using the set text query command

This set text query command adds a new text query for records with title containing african mammals,
and removes the text query for polar bears,
and it resets paging on the ContentType facet field and page number:,or,2,15&s.q=polar+bears&s.cmd=setTextQuery(Title\:\(african+mammals\))

Try It