Skip to content

Commit 9129e1a

Browse files
committed
[DOC] Can't find k1 parameter using search (not indexed?)
1 parent aae2aaf commit 9129e1a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

_search-plugins/keyword-search.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ layout: default
33
title: Keyword search
44
has_children: false
55
nav_order: 10
6+
meta_description: Learn about BM25 keyword search in OpenSearch, including how to configure BM25 parameters k1 and b for better search relevance
7+
meta_keywords: BM25, keyword search, k1, b, term frequency, inverse document frequency, TF/IDF, search relevance, Okapi BM25
68
---
79

810
# Keyword search
@@ -165,7 +167,12 @@ PUT /testindex
165167

166168
## Configuring BM25 similarity
167169

168-
You can configure BM25 similarity parameters at the index level as follows:
170+
You can configure BM25 similarity parameters at the index level. The BM25 algorithm supports two key parameters: `k1` (term saturation parameter) and `b` (length normalization parameter). These parameters control how BM25 scores documents:
171+
172+
- The `k1` parameter controls term frequency saturation, determining how quickly the relevance score increases as term frequency grows.
173+
- The `b` parameter controls the impact of document length on scoring.
174+
175+
You can configure these parameters at the index level as follows:
169176

170177
```json
171178
PUT /testindex

assets/js/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090

9191
const doSearch = async () => {
9292
const query = elInput.value.replace(/[^a-z0-9-_. ]+/ig, ' ');
93-
if (query.length < 3) return hideResults(true);
93+
if (query.length < 2) return hideResults(true);
9494
if (query === lastQuery) return;
9595

9696
recordEvent('search', {

0 commit comments

Comments
 (0)