Skip to content

Commit 61064de

Browse files
diberryCopilot
andcommitted
Fix copilot review comments on Java quickstart
- Add missing cd into project directory - Fix package path: com/azure/cosmos → com/example/cosmos (matches actual sample) - Fix prose to match correct package path - Remove incorrect 'hierarchical' partition key characterization Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6ac7b77 commit 61064de

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

articles/cosmos-db/quickstart-vector-store-java.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ Find the sample code with resource provisioning on [GitHub](https://github.com/A
9191

9292
```bash
9393
mkdir vector-search-quickstart
94-
code vector-search-quickstart
94+
cd vector-search-quickstart
95+
code .
9596
```
9697

9798
1. Create a `pom.xml` file in the project root with the Maven configuration:
@@ -110,13 +111,13 @@ Find the sample code with resource provisioning on [GitHub](https://github.com/A
110111
### [Linux/macOS](#tab/tab-mkdir-linux)
111112

112113
```bash
113-
mkdir -p src/main/java/com/azure/cosmos/vectorsearch
114+
mkdir -p src/main/java/com/example/cosmos/vectorsearch
114115
```
115116

116117
### [Windows](#tab/tab-mkdir-windows)
117118

118119
```powershell
119-
New-Item -ItemType Directory -Force -Path src/main/java/com/azure/cosmos/vectorsearch | Out-Null
120+
New-Item -ItemType Directory -Force -Path src\main\java\com\example\cosmos\vectorsearch | Out-Null
120121
```
121122

122123
---
@@ -187,7 +188,7 @@ These policies are defined in the Bicep templates for the [distance metrics](#di
187188
188189
## Create code files for vector search
189190
190-
Create two Java source files in the `src/main/java/com/azure/cosmos/vectorsearch` directory:
191+
Create two Java source files in the `src/main/java/com/example/cosmos/vectorsearch` directory:
191192
192193
### [Linux/macOS](#tab/tab-touch-linux)
193194
@@ -237,7 +238,7 @@ This Azure OpenAI SDK call converts text like "quintessential lodging near runni
237238
238239
## Understand the code: Store vectors in Azure Cosmos DB
239240
240-
All documents with vector arrays are inserted at scale using the [`executeBulkOperations`](/java/api/com.azure.cosmos.cosmoscontainer) method in `Utils.insertData()`. Each document is mapped to a bulk create operation with a `PartitionKeyBuilder` for hierarchical partition keys. The utility tracks inserted, skipped, and failed counts along with total RU consumption.
241+
All documents with vector arrays are inserted at scale using the [`executeBulkOperations`](/java/api/com.azure.cosmos.cosmoscontainer) method in `Utils.insertData()`. Each document is mapped to a bulk create operation using the `PartitionKeyBuilder` with each document's partition key value. The utility tracks inserted, skipped, and failed counts along with total RU consumption.
241242
242243
This inserts hotel documents including their pre-generated `DescriptionVector` arrays into the container. You can safely pass in all the document data, and the client library handles the batch processing and retries for you.
243244

0 commit comments

Comments
 (0)