openapi: 3.0.1
info:
title: Coveo Activity Activities Result rankings API
description: API for Coveo Platform
termsOfService: https://www.coveo.com/en/support/terms-agreements
contact:
name: Coveo
url: https://connect.coveo.com/s/discussions
version: 1.0.0
servers:
- url: https://platform.cloud.coveo.com
description: Coveo public API endpoint
security:
- oauth2:
- full
tags:
- name: Result rankings
x-displayName: Result rankings
paths:
/rest/search/v2/admin/pipelines/{pipelineId}/resultRankings:
get:
tags:
- Result rankings
summary: Get a List of Result Ranking Rules
description: 'Get a list of result ranking rules
<details>
<summary>Privilege(s) required</summary>
```json
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"}
```
</details>'
operationId: listResultRankingRules
parameters:
- $ref: '#/components/parameters/OrganizationIdQuery'
- $ref: '#/components/parameters/PipelineIdPath'
- name: kind
in: query
deprecated: true
description: 'The kind of result ranking rules to allow in the returned list (i.e., `featured_result` or `ranking_expression`).
By default, both kinds of rules are allowed.
**Deprecated:** Use `ruleTypes` instead.'
schema:
type: string
- name: enabledStatus
in: query
deprecated: true
description: 'The enabled status of result ranking rules to allow in the returned list.
Set to `true` to only allow rules whose `enabled` property is set to `true`, and vice versa.
By default, both enabled and disabled rules are allowed.
**Deprecated:** Use `ruleStatuses` instead.'
schema:
type: boolean
- name: statementGroupId
in: query
description: The unique identifier of the statement group.
schema:
type: string
- $ref: '#/components/parameters/IsOrderAscending'
- name: ruleStatuses
description: 'The rule status to allow in the results. Available statuses are: "active", "inactive".
If you leave this parameter undefined, all rule statuses will be allowed in the results. If you pass an empty array (`[]`), no rules will be returned.'
required: false
in: query
schema:
type: array
items:
$ref: '#/components/schemas/ResultRankingRuleStatus'
default:
- active
- inactive
- $ref: '#/components/parameters/Filter'
- name: ruleTypes
description: 'The rule types to allow in the results. Available types are "featuredResults", "rankingExpressions".
If you leave this parameter undefined, all rule types will be allowed in the results. If you pass an empty array (`[]`), no rules will be returned.'
required: false
in: query
schema:
type: array
items:
$ref: '#/components/schemas/ResultRankingRuleType'
default:
- featuredResults
- rankingExpressions
- name: associatedGroups
description: The group names to allow in the results. Include the `null` value in the array to allow rules that are not associated with any groups (e.g., `[null, "mygroup"]`). If you leave this parameter undefined, all groups will be allowed in the results. If you pass an empty array (`[]`), no rules will be returned.
required: false
in: query
schema:
type: array
items:
type: string
nullable: true
- name: expand
in: query
required: false
description: 'The related resources to expand in the response.
Set to `condition.detailed` to include the detailed version of the condition alongside `condition.reference` in each result ranking condition.'
schema:
type: array
items:
type: string
enum:
- condition.detailed
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ResultRankingListResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth2:
- full
post:
tags:
- Result rankings
summary: Create a New Result Ranking Rule
description: 'Create a new result ranking rule
<details>
<summary>Privilege(s) required</summary>
```json
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}
```
</details>'
operationId: createResultRankingRule
parameters:
- $ref: '#/components/parameters/OrganizationIdQuery'
- $ref: '#/components/parameters/PipelineIdPath'
requestBody:
description: The new result ranking to create
content:
application/json:
schema:
$ref: '#/components/schemas/ResultRankingRuleCreateRequest'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ResultRankingRuleIdOnlyResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth2:
- full
/rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/{resultRankingId}:
get:
tags:
- Result rankings
summary: Get a Result Ranking Rule
description: 'Get a result ranking rule
<details>
<summary>Privilege(s) required</summary>
```json
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"}
```
</details>'
operationId: getResultRankingRule
parameters:
- $ref: '#/components/parameters/OrganizationIdQuery'
- $ref: '#/components/parameters/PipelineIdPath'
- name: resultRankingId
in: path
description: The unique identifier of the result ranking.
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ResultRankingRuleGetResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth2:
- full
put:
tags:
- Result rankings
summary: Update a Result Ranking Rule
description: 'Update a result ranking rule
<details>
<summary>Privilege(s) required</summary>
```json
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}
```
</details>'
operationId: updateResultRankingRule
parameters:
- $ref: '#/components/parameters/OrganizationIdQuery'
- $ref: '#/components/parameters/PipelineIdPath'
- name: resultRankingId
in: path
description: The unique identifier of the result ranking.
example: 120deecf-7822-4d7b-885f-53f184a3a76c
required: true
schema:
type: string
requestBody:
description: The result ranking rule to update
content:
application/json:
schema:
$ref: '#/components/schemas/ResultRankingRuleUpdateRequest'
required: true
responses:
'204':
description: No Content
content: {}
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth2:
- full
delete:
tags:
- Result rankings
summary: Delete a Result Ranking Rule
description: 'Deletes a result ranking rule
<details>
<summary>Privilege(s) required</summary>
```json
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}
```
</details>'
operationId: deleteResultRankingRule
parameters:
- $ref: '#/components/parameters/OrganizationIdQuery'
- $ref: '#/components/parameters/PipelineIdPath'
- name: resultRankingId
in: path
description: The unique identifier of the result ranking.
example: 120deecf-7822-4d7b-885f-53f184a3a76c
required: true
schema:
type: string
responses:
'204':
description: No Content
content: {}
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth2:
- full
/rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/bulkGet:
post:
tags:
- Result rankings
summary: Bulk Get Result Ranking Rules
description: 'Bulk get result ranking rules
<details>
<summary>Privilege(s) required</summary>
```json
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"}
```
</details>'
operationId: bulkGetResultRankingOperation
parameters:
- $ref: '#/components/parameters/OrganizationIdQuery'
- $ref: '#/components/parameters/PipelineIdPath'
- name: kind
in: query
description: 'The kind of result ranking rules to allow in the returned list (i.e., `featured_result` or `ranking_expression`).
By default, both kinds of rules are allowed.'
schema:
type: string
- name: enabledStatus
in: query
description: 'The enabled status of result ranking rules to allow in the returned list.
Set to `true` to only allow rules whose `enabled` property is set to `true`, and vice versa.
By default, both enabled and disabled rules are allowed.'
schema:
type: boolean
- name: statementGroupId
in: query
description: The unique identifier of the statement group.
schema:
type: string
- $ref: '#/components/parameters/IsOrderAscending'
- $ref: '#/components/parameters/Filter'
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
requestBody:
description: A set of parameters to customize the results.
content:
application/json:
schema:
$ref: '#/components/schemas/RestBulkGetRequest'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ResultRankingBulkGetResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'422':
$ref: '#/components/responses/UnprocessableEntity'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth2:
- full
/rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/bulkDelete:
post:
tags:
- Result rankings
summary: Bulk Delete Result Rankings Rules from a Pipeline
description: 'Delete multiple result rankings rules in batch for a specific pipeline.
<details>
<summary>Privilege(s) required</summary>
```json
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}
```
</details>'
operationId: bulkDeleteRankingRules
parameters:
- $ref: '#/components/parameters/PipelineIdPath'
- $ref: '#/components/parameters/OrganizationIdQuery'
requestBody:
description: The rules to delete
content:
application/json:
schema:
$ref: '#/components/schemas/BulkDeleteResultRankingRulesRequest'
required: true
responses:
'200':
description: Deleted
content:
application/json:
schema:
$ref: '#/components/schemas/BulkDeleteResultRankingRulesResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth2:
- full
/rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/copy:
post:
tags:
- Result rankings
summary: Copy Result Rankings Rules to a Pipeline.
description: 'Copies specific result ranking rules from an origin to a target query pipeline. Using the same pipeline as origin and target will duplicate the specified statements in that pipeline.
<details>
<summary>Privilege(s) required</summary>
```json
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"},
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}
```
</details>'
operationId: copyResultRankingRule
parameters:
- $ref: '#/components/parameters/PipelineIdPath'
- $ref: '#/components/parameters/OrganizationIdQuery'
requestBody:
description: The copy operation to perform.
content:
application/json:
schema:
$ref: '#/components/schemas/CopyResultRankingRulesRequest'
required: true
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/CopyResultRankingRulesResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth2:
- full
/rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/duplicate/{resultRankingId}:
post:
tags:
- Result rankings
summary: Duplicate a Result Ranking Rule
description: 'Duplicate a result ranking rule
<details>
<summary>Privilege(s) required</summary>
```json
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"},
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}
```
</details>'
operationId: duplicateResultRankingRule
parameters:
- $ref: '#/components/parameters/OrganizationIdQuery'
- $ref: '#/components/parameters/PipelineIdPath'
- name: resultRankingId
in: path
description: The unique identifier of the result ranking.
example: 120deecf-7822-4d7b-885f-53f184a3a76c
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ResultRankingRuleIdentifiedWithGroupStatusResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth2:
- full
/rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/validate:
post:
tags:
- Result rankings
summary: Validate a Single Result Ranking Operation.
description: 'Validate that a specific operation would be accepted by our API and executed.
<details>
<summary>Privilege(s) required</summary>
```json
{"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"}
```
</details>'
operationId: validateResultRankingOperation
parameters:
- $ref: '#/components/parameters/OrganizationIdQuery'
- $ref: '#/components/parameters/PipelineIdPath'
requestBody:
description: An object that contains an operation to validate.
content:
application/json:
schema:
$ref: '#/components/schemas/ResultRankingSingleOperationValidate'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RestSingleOperationValidationResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'422':
$ref: '#/components/responses/UnprocessableEntity'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth2:
- full
/rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/validate/batch:
post:
tags:
- Result rankings
summary: Validate a Batch of Result Ranking Operations.
description: "\n Validate that a list of operations would be accepted by our API and executed.\n A maximum of 15 can be processed per request.\n<details>\n<summary>Privilege(s) required</summary>\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"QUERY_PIPELINE\",\"type\":\"VIEW\",\"targetId\":\"{pipelineId}\"}\n```\n</details>"
operationId: validateResultRankingOperations
parameters:
- $ref: '#/components/parameters/OrganizationIdQuery'
- $ref: '#/components/parameters/PipelineIdPath'
requestBody:
description: An object that contains the list of operations to validate.
content:
application/json:
schema:
$ref: '#/components/schemas/ResultRankingBatchOperationValidate'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RestBatchOperationValidationResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'419':
$ref: '#/components/responses/AuthenticationTimeout'
'422':
$ref: '#/components/responses/UnprocessableEntity'
'429':
$ref: '#/components/responses/TooManyRequests'
'503':
$ref: '#/components/responses/ServiceUnavailable'
security:
- oauth2:
- full
components:
schemas:
StatementGroupStatus:
type: string
description: The status of the campaign.
enum:
- active
- inactive
- expired
- notStarted
BulkDeleteResultRankingRulesRequest:
type: object
required:
- ids
properties:
ids:
type: array
description: A list of resource identifiers to delete. A maximum of **100** can be sent.
maxItems: 100
items:
type: string
maxLength: 38
ResultRankingRuleTargetQueryExpression:
type: object
required:
- queryExpression
properties:
queryExpression:
type: string
description: Select documents using a query expression.
example:
queryExpression: '@source==TopSource'
ConditionDetailed:
type: object
required:
- condition
properties:
condition:
$ref: '#/components/schemas/BooleanExpression'
ResultRankingRuleRankingExpressionGetResponse:
allOf:
- $ref: '#/components/schemas/ResultRankingRuleResponseBase'
- $ref: '#/components/schemas/ResultRankingRuleGetBaseResponse'
- $ref: '#/components/schemas/ResultRankingRuleRankingExpressionBase'
ResultRankingRuleIdOnlyResponse:
type: object
required:
- id
properties:
id:
type: string
description: The identifier of the result ranking rule
ByType:
required:
- featuredResults
- rankingExpressions
type: object
properties:
rankingExpressions:
type: integer
format: int32
featuredResults:
type: integer
format: int32
ResultRankingRuleLocalizedContentLocale:
type: object
properties:
auto:
$ref: '#/components/schemas/ResultRankingRuleLocalizedContentLocaleAuto'
specific:
type: string
description: The locale code of the KB article to show.
example:
code: en-US
description: Exactly one field should be defined.
ResultRankingBulkGetResponse:
required:
- resultRankings
- totalCount
- totalPages
- groupedBy
type: object
properties:
resultRankings:
type: array
items:
$ref: '#/components/schemas/BulkGetResultRankingRuleIdentifiedWithGroupStatusResponse'
totalCount:
type: integer
format: int32
totalPages:
type: integer
format: int32
groupedBy:
$ref: '#/components/schemas/ResultRankingGroupByResponse'
ResultRankingRuleConditionListResponse:
type: object
properties:
reference:
type: string
description: The ID of a mandatory condition to satisfy.
example: 3896e64f-2132-463a-81c8-26f2e9f89e0a
detailed:
$ref: '#/components/schemas/ConditionDetailed'
RestSingleOperationValidationResponse:
required:
- result
type: object
properties:
result:
$ref: '#/components/schemas/RestOperationValidationResponse'
ResultRankingRuleGetResponse:
oneOf:
- $ref: '#/components/schemas/ResultRankingRuleFeaturedResultsGetResponse'
- $ref: '#/components/schemas/ResultRankingRuleRankingExpressionGetResponse'
discriminator:
propertyName: kind
mapping:
featured_result: '#/components/schemas/ResultRankingRuleFeaturedResultsGetResponse'
ranking_expression: '#/components/schemas/ResultRankingRuleRankingExpressionGetResponse'
PredicateQpl:
type: object
required:
- kind
- code
properties:
kind:
type: string
enum:
- qplPredicate
code:
type: string
description: The [query pipeline language (QPL)](https://docs.coveo.com/en/1449/) definition of the condition.
example: when $query doesn''t end with `gaming laptop`
RestOperationValidationError:
required:
- message
type: object
properties:
message:
type: string
ResultRankingValidationRequest:
oneOf:
- $ref: '#/components/schemas/ResultRankingRuleOperationValidateCreate'
- $ref: '#/components/schemas/ResultRankingRuleOperationValidateUpdate'
- $ref: '#/components/schemas/OperationValidateDelete'
discriminator:
propertyName: operationType
mapping:
CREATE: '#/components/schemas/ResultRankingRuleOperationValidateCreate'
UPDATE: '#/components/schemas/ResultRankingRuleOperationValidateUpdate'
DELETE: '#/components/schemas/OperationValidateDelete'
PredicateBasicExpression:
type: object
required:
- kind
properties:
kind:
type: string
enum:
- basicExpressionAndLocalePredicate
basicQueryExpression:
type: string
description: The value to compare with the search query’s actual `q` value.
example: gaming laptop
matchOperator:
$ref: '#/components/schemas/PredicateMatchOperator'
locale:
$ref: '#/components/schemas/PredicateLocale'
ResultRankingRuleTargetFeaturedResults:
oneOf:
- $ref: '#/components/schemas/ResultRankingRuleTargetUniqueId'
- $ref: '#/components/schemas/ResultRankingRuleTargetLocalizedContent'
- $ref: '#/components/schemas/ResultRankingRuleTargetQueryExpression'
ResultRankingRuleFeaturedResultsGetResponse:
allOf:
- $ref: '#/components/schemas/ResultRankingRuleResponseBase'
- $ref: '#/components/schemas/ResultRankingRuleGetBaseResponse'
- $ref: '#/components/schemas/ResultRankingRuleFeaturedResultsBase'
RestBatchOperationValidationResponse:
required:
- results
type: object
properties:
results:
type: array
description: The list of operation validation results.
items:
$ref: '#/components/schemas/RestOperationValidationResponse'
ResultRankingRuleFeaturedResultsCreateRequest:
allOf:
- $ref: '#/components/schemas/ResultRankingRuleBase'
- $ref: '#/components/schemas/ResultRankingRuleFeaturedResultsBase'
ResultRankingRuleOperationValidateUpdate:
type: object
required:
- operationType
- resourceId
- model
properties:
operationType:
type: string
enum:
- UPDATE
description: 'Validate the update of a ResultRanking rule.
'
model:
$ref: '#/components/schemas/ResultRankingRuleUpdateRequest'
resourceId:
type: string
description: 'The identifier of the resource. '
example: id
RestBulkGetRequest:
type: object
properties:
ids:
type: array
description: A list of resource identifiers to get. A maximum of **1000** can be sent.
items:
type: string
maxItems: 1000
ResultRankingRuleOperationValidateCreate:
type: object
required:
- operationType
- model
properties:
operationType:
type: string
enum:
- CREATE
description: 'Validate the creation of a ResultRanking rule.
'
model:
$ref: '#/components/schemas/ResultRankingRuleCreateRequest'
ResultRankingRuleResponse:
oneOf:
- $ref: '#/components/schemas/ResultRankingRuleFeaturedResultsResponse'
- $ref: '#/components/schemas/ResultRankingRuleRankingExpressionResponse'
discriminator:
propertyName: kind
mapping:
featured_result: '#/components/schemas/ResultRankingRuleFeaturedResultsResponse'
ranking_expression: '#/components/schemas/ResultRankingRuleRankingExpressionResponse'
ResultRankingSingleOperationValidate:
required:
- operation
type: object
properties:
operation:
$ref: '#/components/schemas/ResultRankingValidationRequest'
ResultRankingRuleRankingExpressionListResponse:
allOf:
- $ref: '#/components/schemas/ResultRankingRuleListResponseBase'
- $ref: '#/components/schemas/ResultRankingRuleRankingExpressionBase'
ResultRankingRuleRankingExpressionBase:
type: object
required:
- kind
- targets
- rankingModifier
properties:
kind:
type: string
description: The kind of result ranking.
enum:
- ranking_expression
targets:
type: array
description: Documents that will show up when conditions and predicates are met.
example:
- queryExpression: '@permanentid="6cdw9d02d17"'
items:
$ref: '#/components/schemas/ResultRankingRuleTargetQueryExpression'
rankingModifier:
type: integer
description: 'The ranking score modifier to apply.
Use a positive value to promote the target, or a negative value to demote it.
**Note:** If you do not specify a value for this parameter, the target will receive a significant boost, causing it to appear at the top of the ranked query result set.'
format: int32
example: 1000
isConstant:
type: boolean
description: 'Whether to treat the expression as a constant query expression (cq) (and cache its result set).
**Note:** You should set this option to ''true'' only when the expression is constant for all users. You should leave this option to ''false'' if the expression is based on end-user input (e.g., @concepts=$splitValues(text: $query, separator: ''\s'')) or if it contains a nested query.'
example: true
applyToEveryResult:
type: boolean
description: Whether to apply the QRE to every item in the expression query result set, regardless of its current ranking score. When this option is set to 'false', the QRE only applies to query result set items whose current ranking score is considered high enough by the index.
example: true
targetsMode:
type: string
enum:
- simple
- advanced
description: Define whether rules are simple or advanced. It will influence how it will be loaded in the AdminUI.
ResultRankingRuleBase:
type: object
required:
- name
properties:
name:
type: string
description: The name of the result ranking.
example: Back to School
defaultMatchOperator:
$ref: '#/components/schemas/PredicateMatchOperator'
predicates:
type: array
description: The non-QPL conditions under which the rule may apply. The rule will apply when any of these are satisfied.
example:
- kind: basicExpressionAndLocalePredicate
basicQueryExpression: video game
locale:
kind: all
items:
$ref: '#/components/schemas/Predicate'
condition:
$ref: '#/components/schemas/ResultRankingRuleCondition'
description:
type: string
description: The intended purpose of this result ranking.
example: Back to school promotion.
enabled:
type: bo
# --- truncated at 32 KB (54 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/openapi/coveo-result-rankings-api-openapi.yml