bm25_score
Compute BM25 relevance score between a query and one or more documents. BM25 is the industry-standard keyword-based ranking algorithm used in Elasticsearch, OpenSearch, and Weaviate hybrid search. Returns ranked results with normalized scores.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| b | No | Length normalization factor (default: 0.75) | |
| k1 | No | Term frequency saturation (default: 1.5) | |
| query | Yes | The search query | |
| top_k | No | Return top K results (default: all) | |
| documents | Yes | Array of documents to rank |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| b | No | ||
| k1 | No | ||
| index | No | ||
| query | No | ||
| results | No | ||
| bm25_score | No | ||
| doc_length | No | ||
| doc_preview | No | ||
| avg_doc_length | No | ||
| documents_count | No |