Update Query Profile

Updates a query profile.

A query profile specifies the manipulation configuration to apply to the query criteria and corresponding results of a search against an unstructured text index. The Update Query Profile API allows you to update an existing query profile, which you can then use in the query_profile parameter in the Query Text Index API.

Quick Start

Use this API to update or edit existing query profiles. The update replaces the existing profile entirely, overwriting any existing settings.

For example, the following request updates a query profile called sdksynonyms, ensuring that synonyms are enabled in it, and turning off promotions and blacklists.

1/api/sync/updatequeryprofile/v1?query_profile=sdksynonyms&promotions_enabled=false&promotions_identified=false&synonyms_enabled=true&blacklists_enabled=false

The response confirms the update:

{
  "message": "query profile updated",
  "query_profile": "sdksynonyms"
}
Synchronous
https://api.havenondemand.com/1/api/sync/updatequeryprofile/v1
Asynchronous
https://api.havenondemand.com/1/api/async/updatequeryprofile/v1
Authentication

This API requires an authentication token to be supplied in the following parameter:

Parameter Description
apikey The API key to use to authenticate the API request.
Parameters

This API accepts the following parameters:

Required
Name Type Description
query_profile
resource The name of the query profile. The maximum length is 100 characters.
Optional
Name Type Description
description
string A brief description of the query profile. The maximum length is 255 characters.
query_manipulation_index
string The name of the query manipulation index. The maximum length is 100 characters.
promotions_enabled
boolean Set to true to enable promotions.
promotion_categories
array<string> A list of promotion categories to enable.
promotions_identified
boolean Set to true to identify whether documents are a promotion or not. When set, documents return with an additional promotion property, which is set to true if the document is a promotion.
synonyms_enabled
boolean Set to true to enable synonyms.
synonym_categories
array<string> A list of synonym categories to enable.
blacklists_enabled
boolean Set to true to enable blacklists.
blacklist_categories
array<string> A list of blacklist categories to enable.

This API returns a JSON response that is described by the model below. This single model is presented both as an easy to read abstract definition and as the formal JSON schema.

Asynchronous Use

Additional requests are required to get the result if this API is invoked asynchronously.

You can use /1/job/status/<job-id> to get the status of the job, including results if the job is finished.

You can also use /1/job/result/<job-id>, which waits until the job has finished and then returns the result.

Model
This is an abstract definition of the response that describes each of the properties that might be returned.
Update Query Profile Response {
message ( string ) Indicates that the profile was updated.
query_profile ( string ) The query profile name.
warnings ( array[Warnings] , optional)
}
Update Query Profile Response:Warnings {
code ( integer , optional)
details ( object , optional)
}
Model Schema
This is a JSON schema that describes the syntax of the response. See json-schema.org for a complete reference.
{
    "properties": {
        "message": {
            "type": "string"
        },
        "query_profile": {
            "type": "string"
        },
        "warnings": {
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "code": {
                        "type": "integer"
                    },
                    "details": {
                        "type": "object"
                    }
                }
            }
        }
    },
    "required": [
        "query_profile",
        "message"
    ],
    "type": "object",
    "additionalProperties": false
}


If you would like to provide us with more information then please use the box below:

We will use your submission to help improve our product.