Skip to content

Commit 30eb95c

Browse files
committed
Updates to vector quickstart based on further testing
1 parent 254a4d4 commit 30eb95c

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

articles/search/search-get-started-vector.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: azure-ai-search
88
ms.custom:
99
- ignite-2023
1010
ms.topic: quickstart
11-
ms.date: 06/12/2025
11+
ms.date: 06/18/2025
1212
---
1313

1414
# Quickstart: Vector search using REST
@@ -96,12 +96,11 @@ You use one `.rest` or `.http` file to run all the requests in this quickstart.
9696

9797
1. For the **recommended** keyless authentication via Microsoft Entra ID, you need to replace `api-key: {{apiKey}}` with `Authorization: Bearer {{token}}` in the request headers. Replace all instances of `api-key: {{apiKey}}` that you find in the file.
9898

99-
10099
## Create a vector index
101100

102101
You use the [Create Index](/rest/api/searchservice/indexes/create) REST API to create a vector index and set up the physical data structures on your search service.
103102

104-
The index schema in this example is organized around hotel content. Sample data consists of vector and nonvector names and descriptions of fictitious hotels. This schema includes configurations for vector indexing and queries, and for semantic ranking.
103+
The index schema in this example is organized around hotel content. Sample data consists of vector and nonvector descriptions of fictitious hotels. This schema includes configurations for vector indexing and queries, and for semantic ranking.
105104

106105
1. In Visual Studio Code, open the `az-search-vector-quickstart.rest` file you [created earlier](#create-or-download-the-code-file).
107106

@@ -110,7 +109,7 @@ The index schema in this example is organized around hotel content. Sample data
110109

111110
```http
112111
### Create a new index
113-
POST {{baseUrl}}/indexes?api-version=2023-11-01 HTTP/1.1
112+
POST {{baseUrl}}/indexes?api-version=2024-07-01 HTTP/1.1
114113
Content-Type: application/json
115114
Authorization: Bearer {{token}}
116115
@@ -387,7 +386,7 @@ Key takeaways about the [Create Index](/rest/api/searchservice/indexes/create) R
387386
388387
- The `fields` collection includes a required key field and text and vector fields (such as `Description` and `DescriptionVector`) for text and vector search. Colocating vector and nonvector fields in the same index enables hybrid queries. For instance, you can combine filters, text search with semantic ranking, and vectors into a single query operation.
389388
390-
- Vector fields must be `type: Collection(Edm.Single)` with `dimensions` and `vectorSearchProfile` properties.
389+
- Vector fields must be one of the [EDM data types used for vectors](rest/api/searchservice/supported-data-types#edm-data-types-for-vector-fields), such as `type: Collection(Edm.Single)`. Vector fields also have `dimensions` and `vectorSearchProfile` properties.
391390
392391
- The `vectorSearch` section is an array of approximate nearest neighbor algorithm configurations and profiles. Supported algorithms include hierarchical navigable small world and exhaustive k-nearest neighbor. For more information, see [Relevance scoring in vector search](vector-search-ranking.md).
393392
@@ -652,7 +651,7 @@ Key takeaways about the [Documents - Index REST API](/rest/api/searchservice/doc
652651
653652
## Run queries
654653
655-
Now that documents are loaded, you can issue vector queries against them by using [Documents - Search Post (REST)](/rest/api/searchservice/documents/search-post).
654+
Now that documents are loaded, you can run vector queries against them by using [Documents - Search Post (REST)](/rest/api/searchservice/documents/search-post).
656655
657656
In the next sections, we run queries against the `hotels-vector-quickstart` index. The queries include:
658657
@@ -661,7 +660,7 @@ In the next sections, we run queries against the `hotels-vector-quickstart` inde
661660
- [Hybrid search](#hybrid-search)
662661
- [Semantic hybrid search](#semantic-hybrid-search)
663662
664-
The example vector queries are based on two strings:
663+
The example queries are based on two strings:
665664
666665
- **Search string**: `historic hotel walk to restaurants and shopping`
667666
- **Vector query string** (vectorized into a mathematical representation): `quintessential lodging near running trails, eateries, retail`
@@ -692,10 +691,15 @@ The vector query string is semantically similar to the search string, but it inc
692691
]
693692
}
694693
```
694+
Key takeaways about the [Documents - Search Post](/rest/api/searchservice/documents/search-post) REST API:
695+
696+
+ The `vectorQueries.vector` is the vector query string. It's a vector representation of *quintessential lodging near running trails, eateries, retail*, which is vectorized into 1,536 embeddings for this query.
697+
698+
+ `fields` determines which vector fields are searched.
695699
696-
The `vectorQueries.vector` contains the vectorized text of the query input, `fields` determines which vector fields are searched, and `k` specifies the number of nearest neighbors to return.
700+
+ `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.
697701
698-
The query is a vector representation of *quintessential lodging near running trails, eateries, retail*, which is vectorized into 1,536 embeddings for this query.
702+
+ `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.
699703
700704
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.
701705
@@ -838,7 +842,7 @@ You can add filters, but the filters are applied to the nonvector content in you
838842
}
839843
```
840844
841-
1. Here's another query that uses a geo-filter, limiting results to hotels within 500 kilometers around Washington D.C.
845+
1. Here's another query that uses a geo-filter, limiting results to hotels within 300 kilometers around Washington D.C.
842846
843847
```http
844848
### Run a vector query with a geo filter

0 commit comments

Comments
 (0)