You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/quickstart-vector-store-nodejs.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,7 @@ Here's a simplified example of a hotel document structure:
155
155
- **Indexing policy** creates a vector index on the vector field for efficient similarity search
156
156
- The vector field should be **excluded from standard indexing** to optimize insertion performance
157
157
158
-
For more information on vector policies and indexing, see [Vector search in Azure Cosmos DB](./vector-search.md).
158
+
These policies are defined in the Bicep templates for the [distance metrics](#distance-metrics) for this sample project. For more information on vector policies and indexing, see [Vector search in Azure Cosmos DB](./vector-search.md).
159
159
160
160
## Create npm scripts
161
161
@@ -165,7 +165,7 @@ Edit the `package.json` file and add these scripts:
165
165
166
166
Use these scripts to compile TypeScript files and run the DiskANN index implementation.
This code configures either a `DiskANN` or `quantizedFlat` vector algorithm from environment variables, connects to Azure OpenAI and Azure Cosmos DB using passwordless authentication, loads pre-vectorized hotel data from a JSON file, inserts it into the appropriate container, then generates an embedding for a natural-language query (`quintessential lodging near running trails, eateries, retail`) and executes a VectorDistance SQL query to retrieve the top 5 most semantically similar hotels ranked by similarity score.
0 commit comments