Skip to content

Commit 72f5303

Browse files
Auto-generated API code
1 parent eac539d commit 72f5303

File tree

8 files changed

+65
-13
lines changed

8 files changed

+65
-13
lines changed

elasticsearch/_async/client/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4745,7 +4745,8 @@ async def search(
47454745
limit the impact of the search on the cluster in order to limit the number
47464746
of concurrent shard requests.
47474747
:param min_score: The minimum `_score` for matching documents. Documents with
4748-
a lower `_score` are not included in the search results.
4748+
a lower `_score` are not included in search results and results collected
4749+
by aggregations.
47494750
:param pit: Limit the search to a point in time (PIT). If you provide a PIT,
47504751
you cannot specify an `<index>` in the request path.
47514752
:param post_filter: Use the `post_filter` parameter to filter search results.

elasticsearch/_async/client/async_search.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ async def submit(
401401
limit the impact of the search on the cluster in order to limit the number
402402
of concurrent shard requests
403403
:param min_score: Minimum _score for matching documents. Documents with a lower
404-
_score are not included in the search results.
404+
_score are not included in search results and results collected by aggregations.
405405
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
406406
you cannot specify an <index> in the request path.
407407
:param post_filter:

elasticsearch/_async/client/fleet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ async def search(
430430
:param lenient:
431431
:param max_concurrent_shard_requests:
432432
:param min_score: Minimum _score for matching documents. Documents with a lower
433-
_score are not included in the search results.
433+
_score are not included in search results and results collected by aggregations.
434434
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
435435
you cannot specify an <index> in the request path.
436436
:param post_filter:

elasticsearch/_sync/client/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4743,7 +4743,8 @@ def search(
47434743
limit the impact of the search on the cluster in order to limit the number
47444744
of concurrent shard requests.
47454745
:param min_score: The minimum `_score` for matching documents. Documents with
4746-
a lower `_score` are not included in the search results.
4746+
a lower `_score` are not included in search results and results collected
4747+
by aggregations.
47474748
:param pit: Limit the search to a point in time (PIT). If you provide a PIT,
47484749
you cannot specify an `<index>` in the request path.
47494750
:param post_filter: Use the `post_filter` parameter to filter search results.

elasticsearch/_sync/client/async_search.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def submit(
401401
limit the impact of the search on the cluster in order to limit the number
402402
of concurrent shard requests
403403
:param min_score: Minimum _score for matching documents. Documents with a lower
404-
_score are not included in the search results.
404+
_score are not included in search results and results collected by aggregations.
405405
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
406406
you cannot specify an <index> in the request path.
407407
:param post_filter:

elasticsearch/_sync/client/fleet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def search(
430430
:param lenient:
431431
:param max_concurrent_shard_requests:
432432
:param min_score: Minimum _score for matching documents. Documents with a lower
433-
_score are not included in the search results.
433+
_score are not included in search results and results collected by aggregations.
434434
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
435435
you cannot specify an <index> in the request path.
436436
:param post_filter:

elasticsearch/dsl/query.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ class Knn(Query):
10841084
:arg similarity: The minimum similarity for a vector to be considered
10851085
a match
10861086
:arg rescore_vector: Apply oversampling and rescoring to quantized
1087-
vectors *
1087+
vectors
10881088
:arg boost: Floating point number used to decrease or increase the
10891089
relevance scores of the query. Boost values are relative to the
10901090
default value of 1.0. A boost value between 0 and 1.0 decreases

elasticsearch/dsl/types.py

+56-6
Original file line numberDiff line numberDiff line change
@@ -324,31 +324,58 @@ class DenseVectorIndexOptions(AttrDict[Any]):
324324
`int4_flat` index types.
325325
:arg ef_construction: The number of candidates to track while
326326
assembling the list of nearest neighbors for each new node. Only
327-
applicable to `hnsw`, `int8_hnsw`, and `int4_hnsw` index types.
328-
Defaults to `100` if omitted.
327+
applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw`
328+
index types. Defaults to `100` if omitted.
329329
:arg m: The number of neighbors each node will be connected to in the
330-
HNSW graph. Only applicable to `hnsw`, `int8_hnsw`, and
331-
`int4_hnsw` index types. Defaults to `16` if omitted.
330+
HNSW graph. Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`,
331+
and `int4_hnsw` index types. Defaults to `16` if omitted.
332+
:arg rescore_vector: The rescore vector options. This is only
333+
applicable to `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`, `bbq_flat`,
334+
`int4_flat`, and `int8_flat` index types.
332335
"""
333336

334337
type: Union[
335-
Literal["flat", "hnsw", "int4_flat", "int4_hnsw", "int8_flat", "int8_hnsw"],
338+
Literal[
339+
"bbq_flat",
340+
"bbq_hnsw",
341+
"flat",
342+
"hnsw",
343+
"int4_flat",
344+
"int4_hnsw",
345+
"int8_flat",
346+
"int8_hnsw",
347+
],
336348
DefaultType,
337349
]
338350
confidence_interval: Union[float, DefaultType]
339351
ef_construction: Union[int, DefaultType]
340352
m: Union[int, DefaultType]
353+
rescore_vector: Union[
354+
"DenseVectorIndexOptionsRescoreVector", Dict[str, Any], DefaultType
355+
]
341356

342357
def __init__(
343358
self,
344359
*,
345360
type: Union[
346-
Literal["flat", "hnsw", "int4_flat", "int4_hnsw", "int8_flat", "int8_hnsw"],
361+
Literal[
362+
"bbq_flat",
363+
"bbq_hnsw",
364+
"flat",
365+
"hnsw",
366+
"int4_flat",
367+
"int4_hnsw",
368+
"int8_flat",
369+
"int8_hnsw",
370+
],
347371
DefaultType,
348372
] = DEFAULT,
349373
confidence_interval: Union[float, DefaultType] = DEFAULT,
350374
ef_construction: Union[int, DefaultType] = DEFAULT,
351375
m: Union[int, DefaultType] = DEFAULT,
376+
rescore_vector: Union[
377+
"DenseVectorIndexOptionsRescoreVector", Dict[str, Any], DefaultType
378+
] = DEFAULT,
352379
**kwargs: Any,
353380
):
354381
if type is not DEFAULT:
@@ -359,6 +386,29 @@ def __init__(
359386
kwargs["ef_construction"] = ef_construction
360387
if m is not DEFAULT:
361388
kwargs["m"] = m
389+
if rescore_vector is not DEFAULT:
390+
kwargs["rescore_vector"] = rescore_vector
391+
super().__init__(kwargs)
392+
393+
394+
class DenseVectorIndexOptionsRescoreVector(AttrDict[Any]):
395+
"""
396+
:arg oversample: (required) The oversampling factor to use when
397+
searching for the nearest neighbor. This is only applicable to the
398+
quantized formats: `bbq_*`, `int4_*`, and `int8_*`. When provided,
399+
`oversample * k` vectors will be gathered and then their scores
400+
will be re-computed with the original vectors. valid values are
401+
between `1.0` and `10.0` (inclusive), or `0` exactly to disable
402+
oversampling.
403+
"""
404+
405+
oversample: Union[float, DefaultType]
406+
407+
def __init__(
408+
self, *, oversample: Union[float, DefaultType] = DEFAULT, **kwargs: Any
409+
):
410+
if oversample is not DEFAULT:
411+
kwargs["oversample"] = oversample
362412
super().__init__(kwargs)
363413

364414

0 commit comments

Comments
 (0)