Skip to content

Commit f464400

Browse files
committed
edits
1 parent b03dc91 commit f464400

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: diberry
44
ms.author: haileytapia
55
ms.service: azure-ai-search
66
ms.topic: include
7-
ms.date: 06/26/2025
7+
ms.date: 06/30/2025
88
---
99

1010
In this quickstart, you use JavaScript to create, load, and query vectors. The code examples perform these operations by using the [Azure AI Search client library](/javascript/api/overview/azure/search-documents-readme). The library provides an abstraction over the REST API for access to index operations such as data ingestion, search operations, and index management operations.
@@ -79,6 +79,12 @@ Set up project with Visual Studio Code and JavaScript.
7979
npm install @azure/identity @azure/search-documents dotenv
8080
```
8181

82+
1. Create a `src` directory in your project directory.
83+
84+
```bash
85+
mkdir src
86+
```
87+
8288
## Sign in to Azure
8389

8490
You're using Microsoft Entra ID and role assignments for the connection. Make sure you're logged in to the same tenant and subscription as Azure AI Search and Azure OpenAI. You can use the Azure CLI on the command line to show current properties, change properties, and to sign in. For more information, see [Connect without keys](../../search-get-started-rbac.md).
@@ -98,7 +104,7 @@ You should now be logged in to Azure from your local device.
98104

99105
## Create the vector index
100106

101-
In this section, you create a vector index in Azure AI Search with [SearchIndexClient](/javascript/api/@azure/search-documents/searchindexclient).[createOrUpdateIndex](/javascript/api/@azure/search-documents/searchindexclient#@azure-search-documents-searchindexclient-createorupdateindex). The index schema defines the fields, including the vector field `DescriptionVector`. Once the index is created, you upload documents to the index. The documents contain the vectorized version of the article's description, which enables similarity search based on meaning rather than exact keywords.
107+
In this section, you create a vector index in Azure AI Search with [SearchIndexClient](/javascript/api/@azure/search-documents/searchindexclient).[createOrUpdateIndex](/javascript/api/@azure/search-documents/searchindexclient#@azure-search-documents-searchindexclient-createorupdateindex). The index schema defines the fields, including the vector field `DescriptionVector`.
102108

103109
1. Create a `createIndex.js` file in the `src` directory.
104110

@@ -136,7 +142,7 @@ In this section, you create a vector index in Azure AI Search with [SearchIndexC
136142

137143
## Upload documents to the index
138144

139-
Creating and loading the index are separate steps. You created the index schema [in the previous step](#create-the-vector-index). Now you need to load documents into the index with [SearchClient](/javascript/api/@azure/search-documents/searchclient).[uploadDocuments](/javascript/api/%40azure/search-documents/searchclient#@azure-search-documents-searchclient-uploaddocuments).
145+
Creating and loading the index are separate steps. You created the index schema [in the previous step](#create-the-vector-index). Now you need to load documents into the index with [SearchClient](/javascript/api/@azure/search-documents/searchclient).[uploadDocuments](/javascript/api/%40azure/search-documents/searchclient#@azure-search-documents-searchclient-uploaddocuments). The documents contain the vectorized version of the article's description, which enables similarity search based on meaning rather than exact keywords.
140146

141147
In Azure AI Search, the index stores all searchable content, while the search engine executes queries against that index.
142148

@@ -190,7 +196,7 @@ The vector query string is semantically similar to the search string, but it inc
190196

191197
:::code language="javascript" source="~/azure-search-javascript-samples/quickstart-vector-js/src/queryVector.js" :::
192198

193-
1. This code in the following sections to perform vector searches. The query vector is created using an embedding model from Azure OpenAI.
199+
1. This code is used in the following sections to perform vector searches. The query vector is created using an embedding model from Azure OpenAI.
194200

195201

196202
## Create a single vector search
@@ -360,7 +366,7 @@ This search uses [SearchClient](/javascript/api/@azure/search-documents/searchcl
360366
"HotelName": "Luxury Lion Resort",
361367
"Description": "Unmatched Luxury. Visit our downtown hotel to indulge in luxury accommodations. Moments from the stadium, we feature the best in comfort"
362368
},
363-
```
369+
```
364370

365371
In the vector-only query, which uses HNSW for finding matches, the Sublime Palace Hotel drops to fourth position. Historic Lion, which was second in the full-text search and third in the vector search, doesn't experience the same range of fluctuation, so it appears as a top match in a homogenized result set.
366372

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: diberry
44
ms.author: haileytapia
55
ms.service: azure-ai-search
66
ms.topic: include
7-
ms.date: 06/26/2025
7+
ms.date: 06/30/2025
88
---
99

1010
In this quickstart, you use TypeScript to create, load, and query vectors. The code examples perform these operations by using the [Azure AI Search client library](/javascript/api/overview/azure/search-documents-readme). The library provides an abstraction over the REST API for access to index operations such as data ingestion, search operations, and index management operations.
@@ -232,7 +232,7 @@ The vector query string is semantically similar to the search string, but it inc
232232

233233
:::code language="typescript" source="~/azure-search-javascript-samples/quickstart-vector-ts/src/queryVector.ts" :::
234234

235-
1. This code will be used in the following sections to perform vector searches. The query vector is created using an embedding model from Azure OpenAI.
235+
1. This code is used in the following sections to perform vector searches. The query vector is created using an embedding model from Azure OpenAI.
236236

237237

238238
## Create a single vector search
@@ -402,7 +402,7 @@ This search uses [SearchClient](/javascript/api/@azure/search-documents/searchcl
402402
"HotelName": "Luxury Lion Resort",
403403
"Description": "Unmatched Luxury. Visit our downtown hotel to indulge in luxury accommodations. Moments from the stadium, we feature the best in comfort"
404404
},
405-
```
405+
```
406406

407407
In the vector-only query, which uses HNSW for finding matches, the Sublime Palace Hotel drops to fourth position. Historic Lion, which was second in the full-text search and third in the vector search, doesn't experience the same range of fluctuation, so it appears as a top match in a homogenized result set.
408408

zone-pivots/zone-pivot-groups.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,14 +1353,14 @@ groups:
13531353
title: REST
13541354
# Owner: haileytapia
13551355
- id: search-get-started-vector-search
1356-
title: Python and REST
1356+
title: Programming languages
13571357
prompt: Choose a usage method
13581358
pivots:
1359+
- id: javascript
1360+
title: JavaScript
13591361
- id: python
13601362
title: Python
1363+
- id: rest
1364+
title: REST
13611365
- id: typescript
13621366
title: TypeScript
1363-
- id: javascript
1364-
title: JavaScript
1365-
- id: rest
1366-
title: REST

0 commit comments

Comments
 (0)