Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions www/docs/learn/user-defined-function-reranker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading