[CCI][GUIDE] Minor fixes to poetry docs (#494)

* minor fixes to poetry docs

Signed-off-by: Raman Saparkhan <romasaparhan19@gmail.com>

* updated CHANGELOG.md

Signed-off-by: Raman Saparkhan <romasaparhan19@gmail.com>

* updated CHANGELOG.md

Signed-off-by: Raman Saparkhan <romasaparhan19@gmail.com>

* fixed CHANGELOG.md

Signed-off-by: Raman Saparkhan <romasaparhan19@gmail.com>

---------

Signed-off-by: Raman Saparkhan <romasaparhan19@gmail.com>
This commit is contained in:
Raman Saparkhan
2023-09-15 10:07:52 +03:00
committed by GitHub
parent c8b04a5246
commit 29c6445dcc
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -56,6 +56,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Include parsed error info in `TransportError` in async connections ([#226](https://github.com/opensearch-project/opensearch-py/pull/226))
- Enhanced existing API generator to use OpenSearch OpenAPI spec ([#412](https://github.com/opensearch-project/opensearch-py/pull/412))
- Fix crash when attempting to authenticate with an async connection ([#424](https://github.com/opensearch-project/opensearch-py/pull/424))
- Fixed poetry run command issue on Windows/Mac machines ([#494](https://github.com/opensearch-project/opensearch-py/pull/494))
### Security
- Fixed CVE-2022-23491 reported in opensearch-dsl-py ([#295](https://github.com/opensearch-project/opensearch-py/pull/295))
### Dependencies
+3 -3
View File
@@ -15,7 +15,7 @@ Short for k-nearest neighbors, the k-NN plugin enables users to search for the k
In the following example we create a 5-dimensional k-NN index with random data. You can find a synchronous version of this working sample in [samples/knn/knn-basics.py](../../samples/knn/knn-basics.py) and an asynchronous one in [samples/knn/knn-async-basics.py](../../samples/knn/knn-async-basics.py).
```bash
$ poetry run knn/knn-basics.py
$ poetry run python knn/knn-basics.py
Searching for [0.61, 0.05, 0.16, 0.75, 0.49] ...
{'_index': 'my-index', '_id': '3', '_score': 0.9252405, '_source': {'values': [0.64, 0.3, 0.27, 0.68, 0.51]}}
@@ -96,7 +96,7 @@ for hit in results["hits"]["hits"]:
In [the boolean-filter.py sample](../../samples/knn/knn-boolean-filter.py) we create a 5-dimensional k-NN index with random data and a `metadata` field that contains a book genre (e.g. `fiction`). The search query is a k-NN search filtered by genre. The filter clause is outside the k-NN query clause and is applied after the k-NN search.
```bash
$ poetry run knn/knn-boolean-filter.py
$ poetry run python knn/knn-boolean-filter.py
Searching for [0.08, 0.42, 0.04, 0.76, 0.41] with the 'romance' genre ...
@@ -109,7 +109,7 @@ Searching for [0.08, 0.42, 0.04, 0.76, 0.41] with the 'romance' genre ...
In [the lucene-filter.py sample](../../samples/knn/knn-efficient-filter.py) we implement the example in [the k-NN documentation](https://opensearch.org/docs/latest/search-plugins/knn/filter-search-knn/), which creates an index that uses the Lucene engine and HNSW as the method in the mapping, containing hotel location and parking data, then search for the top three hotels near the location with the coordinates `[5, 4]` that are rated between 8 and 10, inclusive, and provide parking.
```bash
$ poetry run knn/knn-efficient-filter.py
$ poetry run python knn/knn-efficient-filter.py
{'_index': 'hotels-index', '_id': '3', '_score': 0.72992706, '_source': {'location': [4.9, 3.4], 'parking': 'true', 'rating': 9}}
{'_index': 'hotels-index', '_id': '6', '_score': 0.3012048, '_source': {'location': [6.4, 3.4], 'parking': 'true', 'rating': 9}}
+1 -1
View File
@@ -15,5 +15,5 @@ Install [poetry](https://python-poetry.org/docs/).
```
poetry install
poetry run hello/hello.py
poetry run python hello/hello.py
```