---
title: "function score · RUAL Documentation"
description: "Wraps a query with function_score for custom relevance scoring. Builds script_score, random_score and decay functions from pins. The script_score scores…"
canonical: https://docs.rual.nl/block-types/query/query_function_score
language: en
---

# function score

This block is part of the [`query`](https://docs.rual.nl/block-types/query) group and was last modified in core [`v14.0.4`](https://docs.rual.nl/core-versions/140004).

Wraps a query with function_score for custom relevance scoring. Builds script_score, random_score and decay functions from pins. The script_score scores documents by matching their `tags` field against the provided params : documents without a tags field return a neutral score of 1.

### Core Releases
