Skip to content

fix: Update vector-search samples (Article 1)#79

Open
diberry wants to merge 1 commit intoAzure-Samples:mainfrom
diberry:fix/vector-search-updates
Open

fix: Update vector-search samples (Article 1)#79
diberry wants to merge 1 commit intoAzure-Samples:mainfrom
diberry:fix/vector-search-updates

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented May 6, 2026

Description

This PR updates the vector-search samples (Article 1) to standardize collection lifecycle management across all 5 languages (Python, TypeScript, Go, Java, .NET).

Changes

  • Standardizes collection drop behavior: drop at start (if exists), always drop at end
  • Improves sample reliability and consistency
  • Matches the pattern used in select-algorithm samples (Article 2/3)

Context

These changes were originally bundled in PR #74 (Article 2/3 select-algorithm samples) but have been extracted into this separate PR as they pertain to Article 1 vector-search samples.

Files Changed

Go:

  • ai/vector-search-go/src/create_embeddings.go
  • ai/vector-search-go/src/diskann.go
  • ai/vector-search-go/src/hnsw.go
  • ai/vector-search-go/src/ivf.go
  • ai/vector-search-go/src/show_indexes.go

Java:

  • ai/vector-search-java/src/main/java/com/azure/documentdb/samples/DiskAnn.java
  • ai/vector-search-java/src/main/java/com/azure/documentdb/samples/HNSW.java
  • ai/vector-search-java/src/main/java/com/azure/documentdb/samples/IVF.java

Python:

  • ai/vector-search-python/src/diskann.py
  • ai/vector-search-python/src/hnsw.py
  • ai/vector-search-python/src/ivf.py

TypeScript:

  • ai/vector-search-typescript/src/diskann.ts
  • ai/vector-search-typescript/src/hnsw.ts
  • ai/vector-search-typescript/src/ivf.ts

.NET:

  • ai/vector-search-dotnet/Services/VectorSearchService.cs

Standardize collection drop behavior across all vector-search samples:
- Drop collection at start (if exists)
- Always drop collection at end

This improves sample reliability and matches the pattern used in
select-algorithm samples.

Affects: Python, TypeScript, Go, Java, .NET

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
diberry added a commit to diberry/documentdb-samples that referenced this pull request May 6, 2026
Removed vector-search sample updates from this PR as they pertain to
Article 1, not Article 2/3. These changes are now in PR Azure-Samples#79.

This PR now contains only Article 2/3 select-algorithm samples.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented May 6, 2026

ℹ️ These vector-search sample updates were extracted from PR #74 (Article 2/3 select-algorithm samples) to keep concerns separated. PR #74 now contains only Article 2/3 code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant