Skip to content

Scoring

Scoring controls how search results are ranked. By default, Azure Cognitive Search ranks results by relevance score based on the search text. Scoring profiles allow you to influence this ranking based on additional signals such as geographic proximity, profile tags, or personalized user data.

Scoring profiles

A scoring profile is selected via the scoringProfile parameter of the search request. The following profiles are available:

Profile value Description
geo Boosts results based on the geographic distance between the scoringReferencePoint and the geo property of each result. Objects within 100 km are ranked closer first.
tags Boosts results where their profileTag values match the scoringTags provided in the request.
geoAndTags Combines both geo distance and tag matching to boost results. Requires both scoringReferencePoint and scoringTags to have effect.
personalisationV1 Uses the authenticated user's own profile (categories and profile tags) to boost results. Requires personalize: true and a valid Authorization token.

Default behaviour

If no scoringProfile is specified and no scoringReferencePoint is provided, the default scoring profile is applied. The default profile boosts results based on text field relevance — it adds extra weight to name, description, type, and categoryName fields.


geo profile — distance scoring

Boosts search results based on proximity to a given geographic point. Use the scoringReferencePoint parameter to specify the reference coordinates.

What affects the score:

Field Effect
geo Boosted logarithmically by distance. Objects closer to the reference point receive a higher score.

Information

Only objects whose geo property is within 100 km of the reference point are boosted. Objects further away are not affected by this profile.

How to use

https://api.discover.swiss/info/v2/search?scoringProfile=geo&scoringReferencePoint=8.5172912,47.5722339

link:

https://api.discover.swiss/info/v2/search

body:

{
    "scoringProfile": "geo",
    "scoringReferencePoint": "8.5172912,47.5722339"
}

Auto-fallback

If scoringReferencePoint is provided but scoringProfile is not set, the geo profile is applied automatically as a fallback.


tags profile — tag scoring

Boosts search results whose tags match any of the values listed in scoringTags.

What affects the score:

Field Effect
allTag Boosted when any tag in this field matches a value from scoringTags.

How to use

https://api.discover.swiss/info/v2/search?scoringProfile=tags&scoringTags=profile-sport-1&scoringTags=profile-sport-3

link:

https://api.discover.swiss/info/v2/search

body:

{
    "scoringProfile": "tags",
    "scoringTags": ["profile-sport-1", "profile-sport-3"]
}


geoAndTags profile — combined scoring

Boosts results using both geographic distance and tag matching simultaneously. This profile requires both scoringReferencePoint and scoringTags to be provided for the full boosting effect.

What affects the score:

Field Effect
geo Boosted logarithmically by distance (up to 100 km), same as the geo profile.
allTag Boosted when any tag in this field matches a value from scoringTags, same as the tags profile.

How to use

https://api.discover.swiss/info/v2/search?scoringProfile=geoAndTags&scoringReferencePoint=8.5172912,47.5722339&scoringTags=profile-sport-1

link:

https://api.discover.swiss/info/v2/search

body:

{
    "scoringProfile": "geoAndTags",
    "scoringReferencePoint": "8.5172912,47.5722339",
    "scoringTags": ["profile-sport-1", "profile-sport-3"]
}


personalisationV1 profile — personalization scoring

Uses the authenticated user's own profile data (categories and profile tags) to boost results that are relevant to that specific user. This is the most comprehensive scoring profile, combining text relevance, tag matching, category matching, and geo proximity.

What affects the score:

Field Effect
name Text relevance weight applied across all language variants (de, en, fr, it).
categoryName Text relevance weight applied across all language variants — higher weight than name.
type Text relevance weight — highest among text fields.
allTag Boosted when tags match values from the user's profile.
profileTag Boosted when profile tags match values from the user's profile.
category Boosted based on categories from the user's profile. Categories with higher relevance receive a larger boost.
geo Boosted logarithmically by distance. Objects within 15 km of the user's location receive the strongest boost.

Requirements

  • personalize must be set to true in the request.
  • A valid Authorization token must be included in the request headers.
  • If personalize is true but the Authorization token is missing or invalid, personalization is not applied and no scoring profile is used.

Relationship between personalize and scoringProfile

  • personalize and scoringProfile are independent properties.
  • When personalize is true, the PersonalisationV1 scoring profile is always applied, regardless of the scoringProfile value.
  • When personalize is false, the scoringProfile value is used to select any other profile.
  • You cannot combine personalization with non-personalizing scoring profiles such as geo, tags, or geoAndTags.

How to use

https://api.discover.swiss/info/v2/search?personalize=true

link:

https://api.discover.swiss/info/v2/search

body:

{
    "personalize": true,
    "searchProfileName": "my-profile"
}

Using a specific search profile

When personalization is enabled, you can optionally specify a search profile from the user's account via searchProfileName. If not provided, the first profile in the user's account is used.


Scoring priority

The scoring profile is resolved in the following order of priority:

  1. Personalization — if personalize is true and authorization succeeds, PersonalisationV1 is applied.
  2. Explicit profile — if personalize is false and scoringProfile is set to a valid value, that profile is used.
  3. Reference point fallback — if scoringReferencePoint is provided and no profile was selected, the geo profile is applied automatically.
  4. No scoring — if none of the above apply, the default Azure Cognitive Search relevance scoring is used.

Request parameters reference

Parameter Type Description
scoringProfile string Optional. Scoring profile to apply. Possible values: geo, tags, geoAndTags, personalisationV1. If not set, default scoring is applied.
scoringReferencePoint string Optional. Coordinates in format Longitude,Latitude (e.g. 8.5172912,47.5722339). Used by geo and geoAndTags profiles, and as a fallback trigger.
scoringTags string[] Optional. List of profile tags used by tags and geoAndTags profiles to boost matching results. (Beta)
personalize bool Optional. When true, enables personalized scoring using the authenticated user's profile. Requires a valid Authorization token.
searchProfileName string Optional. When personalization is enabled, specifies which user search profile to use. Defaults to the first available profile.