diff --git a/www/docs/learn/user-defined-function-reranker.md b/www/docs/learn/user-defined-function-reranker.md index 4ad504b96..2ac366532 100644 --- a/www/docs/learn/user-defined-function-reranker.md +++ b/www/docs/learn/user-defined-function-reranker.md @@ -146,6 +146,24 @@ get('$.score') * get('$.part_metadata.boost') get('$.document_metadata.reviews[0].score', 0) ``` +#### Get the full list of scores + +The `$.all_scores` function retrieves the entire list of scores for all search +results in the current ranking. This is useful because it considers the +relevance of results in the overall list. + +```sql +get('$.all_scores') +``` +#### Get the index of the result + +The `$.index` function retrieves the index of a result within its original +ranking. This is useful for implementing position-aware adjustments, such as +favoring higher-ranked results. + +```sql +get('$.index') +``` ## Time functions The following table lists the available time functions that allow you to