You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/weaviate/api/graphql/search-operators.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,7 +265,7 @@ This operator allows you to combine [BM25](#bm25) and vector search to get a "be
265
265
|`vector`| no |`[float]`| optional to supply your own vector |
266
266
|`properties`| no |`[string]`| list of properties to limit the BM25 search to, default all text properties |
267
267
|`fusionType`| no |`string`| the type of hybrid fusion algorithm (available from `v1.20.0`) |
268
-
|`bm25SearchOperator`| no |`object`| set how many of the (bm25) query tokens must be present in the target object for it to be considered a match. (available from `v1.31.0`) |
268
+
|`bm25SearchOperator`| no |`object`| set how many of the (bm25) query tokens must be present within a single searched property for an object to be considered a match. (available from `v1.31.0`) |
269
269
270
270
* Notes:
271
271
*`alpha` can be any number from 0 to 1, defaulting to 0.75.
@@ -435,11 +435,11 @@ To mitigate this effect, Weaviate automatically performs a search with a higher
435
435
436
436
<SearchOperators/>
437
437
438
-
Use `bm25SearchOperator` to set how many of the query tokens must be present in the target object for it to be considered a match in the keyword (bm25) search portion of the hybrid search. This is useful when you want to ensure that only objects with a certain number of relevant keywords are returned.
438
+
Use `bm25SearchOperator` to set how many of the query tokens must be present within a single searched property for an object to be considered a match in the keyword (bm25) search portion of the hybrid search. This is useful when you want to ensure that only objects with a certain number of relevant keywords are returned.
439
439
440
-
The available options are `And`, or `Or`. If `Or` is set, an additional parameter `minimumOrTokensMatch` must be specified, which defines how many of the query tokens must match for the object to be considered a match.
440
+
The available options are `And`, or `Or`. With `And`, all of the query tokens must appear together within a single searched property; tokens spread across different properties do not match. If `Or` is set, an additional parameter `minimumOrTokensMatch` must be specified, which defines how many of the query tokens must be present within a single searched property for the object to be considered a match.
441
441
442
-
If not yet, the keyword search will behave as if `Or` was set with `minimumOrTokensMatch`equal to 1.
442
+
If not set, the keyword search behaves as if `Or` was set with a `minimumOrTokensMatch`of `1`.
443
443
444
444
## BM25
445
445
@@ -458,7 +458,7 @@ The `bm25` operator supports the following variables:
458
458
| --------- | -------- | ----------- |
459
459
|`query`| yes | The keyword search query. |
460
460
|`properties`| no | Array of properties (fields) to search in, defaulting to all properties in the collection. |
461
-
|`searchOperator`| no | set how many of the query tokens must be present in the target object for it to be considered a match. (available from `v1.31.0`) |
461
+
|`searchOperator`| no | set how many of the query tokens must be present within a single searched property for an object to be considered a match. (available from `v1.31.0`) |
462
462
463
463
:::info Boosting properties
464
464
Specific properties can be boosted by a factor specified as a number after the caret sign, for example `properties: ["title^3", "summary"]`.
@@ -537,11 +537,11 @@ import GraphQLFiltersBM25FilterExample from '/_includes/code/graphql.filters.bm2
537
537
538
538
<SearchOperators/>
539
539
540
-
Use `searchOperator` to set how many of the query tokens must be present in the target object for it to be considered a match. This is useful when you want to ensure that only objects with a certain number of relevant keywords are returned.
540
+
Use `searchOperator` to set how many of the query tokens must be present within a single searched property for an object to be considered a match. This is useful when you want to ensure that only objects with a certain number of relevant keywords are returned.
541
541
542
-
The available options are `And`, or `Or`. If `Or` is set, an additional parameter `minimumOrTokensMatch` must be specified, which defines how many of the query tokens must match for the object to be considered a match.
542
+
The available options are `And`, or `Or`. With `And`, all of the query tokens must appear together within a single searched property; tokens spread across different properties do not match. If `Or` is set, an additional parameter `minimumOrTokensMatch` must be specified, which defines how many of the query tokens must be present within a single searched property for the object to be considered a match.
543
543
544
-
If not yet, the keyword search will behave as if `Or` was set with `minimumOrTokensMatch`equal to 1.
544
+
If not set, the keyword search behaves as if `Or` was set with a `minimumOrTokensMatch`of `1`.
Copy file name to clipboardExpand all lines: docs/weaviate/concepts/search/keyword-search.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,15 +136,15 @@ import SearchOperators from '/_includes/feature-notes/search-operators.mdx';
136
136
137
137
<SearchOperators/>
138
138
139
-
Search operators define the minimum number of query [tokens](../../search/bm25.md#set-tokenization) that must be present in the object to be returned.
139
+
Search operators define the minimum number of query [tokens](../../search/bm25.md#set-tokenization) that must be present within a single searched property for an object to be returned.
140
140
141
141
Conceptually, it works as though a filter is applied to the results of the BM25 score calculation. The available operators are:
142
-
-`and`: All tokens must be present in the object
143
-
-`or`: At least one token must be present in the object, with the minimum number of tokens being configurable (`minimumOrTokensMatch`)
142
+
-`and`: All tokens must be present within a single searched property
143
+
-`or`: At least one token must be present within a single searched property, with the minimum number of tokens being configurable (`minimumOrTokensMatch`)
144
144
145
-
As an example, a BM25 query of `computer networking guide` with the `and` operator would only return objects that contain all of the tokens `computer`, `networking`, and `guide`. In contrast, the same query with the `or` operator would return objects that contain at least one of those tokens. If the `or` operator is used with a `minimumOrTokensMatch` of `2`, then at least two of the tokens must be present in the object.
145
+
As an example, a BM25 query of `computer networking guide` with the `and` operator would only return objects where all of the tokens `computer`, `networking`, and `guide` appear together within a single searched property. If the tokens are spread across different properties — for example, `computer` in `title` and `networking` in `description` — the object does not match under `and`. In contrast, the same query with the `or` operator would return objects where at least one of those tokens appears in a searched property. If the `or` operator is used with a `minimumOrTokensMatch` of `2`, then at least two of the tokens must be present within a single searched property.
146
146
147
-
If not specified, the default operator is `or`, with a `minimumOrTokensMatch` of `1`. This means that at least one token must be present in the object for it to be returned.
147
+
If not specified, the default operator is `or`, with a `minimumOrTokensMatch` of `1`. This means that at least one token must be present in a searched property for the object to be returned.
148
148
149
149
import BM25OperatorsLight from '../img/bm25_operators_light.png';
150
150
import BM25OperatorsDark from '../img/bm25_operators_dark.png';
Copy file name to clipboardExpand all lines: docs/weaviate/search/bm25.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ import SearchOperators from '/_includes/feature-notes/search-operators.mdx';
99
99
100
100
<SearchOperators/>
101
101
102
-
Search operators define the minimum number of query [tokens](#set-tokenization) that must be present in the object to be returned. The options are `and`, or `or` (default).
102
+
Search operators define the minimum number of query [tokens](#set-tokenization) that must be present within a single searched property for an object to be returned. The options are `and`, or `or` (default).
103
103
104
104
### `or`
105
105
@@ -142,7 +142,7 @@ With the `or` operator, the search returns objects that contain at least `minimu
142
142
143
143
### `and`
144
144
145
-
With the `and` operator, the search returns objects that contain all tokens in the search string.
145
+
With the `and` operator, the search returns objects where all tokens in the search string appear together within a single searched property.
Copy file name to clipboardExpand all lines: docs/weaviate/search/hybrid.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -384,7 +384,7 @@ import SearchOperators from '/_includes/feature-notes/search-operators.mdx';
384
384
385
385
<SearchOperators/>
386
386
387
-
Keyword (BM25) search operators define the minimum number of query [tokens](#tokenization) that must be present in the object to be returned. The options are `and`, or `or` (default).
387
+
Keyword (BM25) search operators define the minimum number of query [tokens](#tokenization) that must be present within a single searched property for an object to be returned. The options are `and`, or `or` (default).
388
388
389
389
### `or`
390
390
@@ -435,7 +435,7 @@ With the `or` operator, the search returns objects that contain at least `minimu
435
435
436
436
### `and`
437
437
438
-
With the `and` operator, the search returns objects that contain all tokens in the search string.
438
+
With the `and` operator, the search returns objects where all tokens in the search string appear together within a single searched property.
0 commit comments