API - Enable or Disable Query Elevation

Index Management

Switches Query Elevation on or off for your Opensolr Index: the results you pin to the top, or exclude, for a search.

Endpointhttps://opensolr.com/solr_manager/api/elevation_toggle
MethodGET or POST
Authemail and api_key of your account, as GET or POST parameters: Authentication.

01 · Parameters

core_nameRequired

The name of your index.

enableRequired

yes or no.

02 · Example

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

03 · Answer

{
    "status": true,
    "msg": [
        "Added QueryElevationComponent to solrconfig.xml",
        "Created elevate.xml",
        "Core reloaded"
    ]
}

msg lists what was changed. With yes, what is missing is added to solrconfig.xml, search.xml and elevate.xml, and the index reloads. With no, only the switch is turned off.

04 · Errors

Invalid enable value — must be yes or noHTTP 200

enable is missing or wrong.

ERROR_NOT_CORE_OWNERHTTP 200

The index is not yours.

Could not read solrconfig.xmlHTTP 200

The configuration of the index could not be read. 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

Pin and exclude results in the Control Panel: Pin results, Exclude results.

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