Skip to content

Commit 35987a6

Browse files
committed
stronger contrast between count 7 and top 5
1 parent 9d0fee8 commit 35987a6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

articles/search/includes/quickstarts/search-get-started-vector-python.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,8 @@ The first example demonstrates a basic scenario where you want to find document
399399

400400
The vector query string is `quintessential lodging near running trails, eateries, retail`, which is vectorized into 1,536 embeddings for this query.
401401

402-
The response for the vector equivalent of `quintessential lodging near running trails, eateries, retail` includes seven results but the code specifies `top=5` so only the first five results are returned. Furthermore, only the fields specified by the `select` are returned.
402+
<!-- retain numeric references to 5 and 7. Too hard to spot these values if they are written out. -->
403+
The response for the vector equivalent of `quintessential lodging near running trails, eateries, retail` consists of 7 results but the code specifies `top=5` so only the first 5 results are returned. Furthermore, only the fields specified by the `select` are returned.
403404

404405
`search_client.search()` returns a dict-like object. Each result provides a search score, which can be accessed using `score = result.get("@search.score", "N/A")`. While not displayed in this example, in a similarity search, the response always includes `k` results ordered by the value similarity score.
405406

articles/search/includes/quickstarts/search-get-started-vector-rest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ The vector query string is semantically similar to the search string, but it inc
669669
670670
### Single vector search
671671
672-
1. Formulate the request. The query is a 1536 float representation of *quintessential lodging near running trails, eateries, retail*. The query is searching `DescriptionVector` and returning k-5 results.
672+
1. Formulate the request. The query is a 1536 float representation of *quintessential lodging near running trails, eateries, retail*. The query is searching `DescriptionVector` and returning k-5 results. It's using the "exhaustive" override parameter to perform a full scan of the index instead of approximate nearest neighbor. An exhaustive search is useful for small indexes.
673673
674674
```http
675675
### Run a single vector query
@@ -700,7 +700,7 @@ The vector query string is semantically similar to the search string, but it inc
700700
701701
+ `kind` set to `vector` means that the query string is a vector. If `kind` was set to `text`, you would need extra capability (a [vectorizer]()) to encode a human readable text string into a vector at query time. Vectorizers are omitted from this quickstart to keep the exercise simple.
702702
703-
+ `k` specifies the number of nearest neighbors to return in the response. A `count` parameter specifies the number of matches found in the index. Including count is a best practice for queries, but it's less useful for similarity search where the algorithm can find some degree of similarity in almost any document.
703+
+ `k` specifies the number of matches to return in the response. A `count` parameter specifies the number of matches found in the index. Including count is a best practice for queries, but it's less useful for similarity search where the algorithm can find some degree of similarity in almost any document.
704704
705705
1. Select **Send request**. You should have an `HTTP/1.1 200 OK` response. The response body should include the JSON representation of the search results.
706706

0 commit comments

Comments
 (0)