Getting Facet Information for Text and Literal Fields

When you request facet information for a text or literal field, ASN Search returns facet counts for the top 40 values in the specified field. You can include the facet-FIELD-top-n parameter to limit the number of facet values that are returned for a particular field.

Note
To get facet information for a text or literal field, the field must be configured to enable faceting. For more information, see Field Names and Types.

For example, the following request gets facet counts for the top five most-frequently-occurring values in the subject field:

../search?bq=description:'read'&facet=fct_jurisdiction&facet-fct_jurisdiction-top-n=5

The response includes the returns the facet information after the list of hits.

"facets":{
    "fct_jurisdiction":{"constraints":[
        {"value":"New York","count":1473},
        {"value":"Maryland","count":1066},
        {"value":"Washington","count":836},
        {"value":"New Jersey","count":768},
        {"value":"Nevada","count":537}
    ]
}