Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename DenseVector/dense_vector field type to KnnVector/knn_vector #853

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `pool_maxsize` to `AsyncOpenSearch` ([845](https://github.com/opensearch-project/opensearch-py/pull/845))
- Added `ssl_assert_hostname` to `AsyncOpenSearch` ([843](https://github.com/opensearch-project/opensearch-py/pull/843))
### Changed
- Rename `DenseVector` field type to `KnnVector` ([853](https://github.com/opensearch-project/opensearch-py/pull/853))
### Deprecated
### Removed
### Updated APIs
Expand Down
4 changes: 2 additions & 2 deletions opensearchpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
CustomField,
Date,
DateRange,
DenseVector,
KnnVector,
Double,
DoubleRange,
Field,
Expand Down Expand Up @@ -178,7 +178,7 @@
"Date",
"DateHistogramFacet",
"DateRange",
"DenseVector",
"KnnVector",
"Document",
"Double",
"DoubleRange",
Expand Down
4 changes: 2 additions & 2 deletions opensearchpy/helpers/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ def _deserialize(self, data: Any) -> Any:
return float(data)


class DenseVector(Float):
name: Optional[str] = "dense_vector"
class KnnVector(Float):
name: Optional[str] = "knn_vector"

def __init__(self, dims: Any, **kwargs: Any) -> None:
kwargs["multi"] = True
Expand Down
Loading