Add Facet Field Command
Syntax
The add facet field command uses the following syntax:
addFacetField(<facetField>, <combineMode>[, <pageNumber or whiteList>, <pageSize>])
The default value for pageNumber is 1, if unspecified. The default value for pageSize is 10, if unspecified.
A whiteList has the form value1:value2:… It specifies a set of values that are to be included in the facet counts even if their counts are not in the top pageSize, provided only that their counts are non-zero.
Function
The add facet field command adds the facet field, and then it calls clearAllFacetPaging().
Example – Using the add facet field command
This add facet field command adds a new facet field for SubjectTerms and it resets paging on the ContentType facet field:
s.ff=ContentType,or,2,15&s.cmd=addFacetField(SubjectTerms,and)
Example – Using the add facet field command with a white list
This command adds a new facet field for SubjectTerms and specifies that 5 values should be returned, including “education” provided that its count is non-zero:
s.cmd=addFacetField(SubjectTerms,and,education,5)