API - Get Facetable Fields

Web Crawler

Lists the fields of your Opensolr Index that can be used as facets, with how your hosted search page shows each one.

Endpointhttps://opensolr.com/solr_manager/api/get_facetable_fields
MethodGET or POST
Authemail and api_key of your account, as GET or POST parameters: Authentication. Only the account that owns the index.

01 · Parameters

core_nameRequired

The name of your index.

02 · Example

curl -s "https://opensolr.com/solr_manager/api/get_facetable_fields?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index"

03 · Answer

{
    "status": true,
    "fields": [
        {
            "field": "category_ss",
            "type": "string",
            "solr_type": "strings",
            "multi": true,
            "label": "Category",
            "docs": 1840,
            "enabled": true,
            "widget": "list",
            "weight": 1
        }
    ]
}
type

string, numeric or date.

multi

Whether a document can hold several values.

docs

How many documents have a value.

enabled, widget, label, weight

The facet settings of the hosted search page: shown or not, how, under which name, in which order.

04 · Errors

Missing core_name

No index name.

Not authorized or core not found

The index is not yours, or does not exist.

No response from server agent

The server of the index did not answer. Try again.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too many calls. Wait for the Retry-After seconds: Rate limits.

05 · Related

Choose the facets in the Control Panel: Configure facets.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.