Search

Configuring relevancy and field weighting

Configuring relevancy and field weighting for search functionality

Relevancy and field weighting determine how product search results are ranked and prioritized in the commerce backend. By adjusting field weights, you can fine-tune how different product attributes influence the search score calculated by Azure AI Search.

This configuration allows you to emphasize more important data, such as product names or brands, and reduce the impact of less critical fields like descriptions.


Working with field weighting

Define field weights to tune relevancy (see example below).

Example weights:

"Weights": {
    "Name": 1.1,
    "Categories/Name": 1.5,
    "Brand/Name": 1.2,
    "ArticleNumber": 2,
    "Texts/Text1": 1,
    "Texts/Text2": 1,
    "Texts/Text3": 1,
    "ProductIdString": 20
}

Typical use cases

Field weighting allows merchants and developers to shape the search experience by prioritizing certain product data fields.

1. Prioritizing product name and brand

Give more importance to key identifiers like product name or brand to improve search precision. Examples include:

  • Assigning higher weights to product name and brand fields for stronger ranking.
  • Ensuring products with matching brand names appear higher in results.

2. Reducing influence of long descriptions

Lowering weights on descriptive fields can help reduce noise in search results. Examples include:

  • Decreasing weight for product descriptions to focus on key product attributes.
  • Preventing irrelevant matches caused by long or generic text blocks.

3. Testing and adjusting weights

Field weighting can be tuned iteratively to achieve desired relevancy outcomes. Examples include:

  • A/B testing different weight values to evaluate impact on result quality.
  • Updating weights seasonally or per market to reflect user search behavior.