Coveo · Schema

Coveo Search RestRankingFunction

Artificial IntelligenceAnalyticsCatalogCommerceCustomersExperienceMachine-LearningPersonalizationRecommendationsSearch

Properties

Name Type Description
expression string A mathematical expression to evaluate for each query result. The result of this expression for a given query result generates a boost which is then added to the ranking score of that query result. **N
normalizeWeight boolean Whether to normalize the ranking score boosts resulting from the evaluation of this query ranking function using the standard index scale. Unless you want to completely override the index ranking and
modifier integer The maximum boost this query ranking function can add to the ranking score of any given query result. This property only has a meaning if `normalizeWeight` is set to `true`. **Default:** `600`
View JSON Schema on GitHub

JSON Schema

coveo-search-restrankingfunction-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/coveo/main/json-schema/coveo-search-restrankingfunction-schema.json",
  "title": "Coveo Search RestRankingFunction",
  "required": [
    "expression"
  ],
  "type": "object",
  "properties": {
    "expression": {
      "type": "string",
      "description": "A mathematical expression to evaluate for each query result. The result of this expression for a given query result generates a boost which is then added to the ranking score of that query result.\n\n**Note:** Query ranking function expressions support the [ExprTk](http://www.partow.net/programming/exprtk/index.html) library syntax. However, the following statements are disabled:\n\n- `if`/`else`\n- `switch`\n- `while`\n- `repeat until`\n\nThe following time constants are also available in query ranking functions:\n\n- `NOW`: A value corresponding to the precise moment when the query reaches the index.\n- `YEAR`: A value corresponding to the duration of a year (i.e., 365.25 days).\n- `WEEK`: A value corresponding to the duration of a week.\n- `DAY`: A value corresponding to the duration of a day.\n\n**Tip:** If your query ranking function expression references certain numeric fields, you should ensure that the **Use cache for computed fields** option is enabled for each of those fields in order to speed up evaluation (see [Manage fields](https://docs.coveo.com/en/1833/)).",
      "example": "-sqrt(dist(@longitude, @latitude, 46.8167, -71.2167))"
    },
    "normalizeWeight": {
      "type": "boolean",
      "description": "Whether to normalize the ranking score boosts resulting from the evaluation of this query ranking function using the standard index scale.\n\nUnless you want to completely override the index ranking and use the results of this query ranking function directly to boost the ranking scores of query results, you should set this to `true`.\n\n**Default:** `false`",
      "example": true,
      "default": false
    },
    "modifier": {
      "type": "integer",
      "description": "The maximum boost this query ranking function can add to the ranking score of any given query result.\n\nThis property only has a meaning if `normalizeWeight` is set to `true`.\n\n**Default:** `600`",
      "format": "int64",
      "example": 100,
      "default": 600
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/coveo-search-restrankingfunction"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.