Skip to content

[FLINK-AGENTS][integrations] Fix OpenSearchVectorStore for Amazon OpenSearch Serverless#678

Open
avichaym wants to merge 1 commit into
apache:mainfrom
avichaym:fix/aoss-integration
Open

[FLINK-AGENTS][integrations] Fix OpenSearchVectorStore for Amazon OpenSearch Serverless#678
avichaym wants to merge 1 commit into
apache:mainfrom
avichaym:fix/aoss-integration

Conversation

@avichaym
Copy link
Copy Markdown
Contributor

Fixes #674

The integration defaults to service_type=serverless but doesn't actually work against AOSS. Five fixes:

Add x-amz-content-sha256 + Content-Length headers for SigV4 signing (AOSS returns 403 without them)
Skip _refresh calls on serverless (AOSS returns 404 — API not exposed)
Omit custom _id in _bulk actions on serverless (AOSS rejects them)
Validate _bulk responses for partial failures (was silently losing data)
Use FAISS engine instead of default NMSLIB for index creation (NMSLIB doesn't support filtered KNN)

Also adds a 15s settle after index creation on serverless for AOSS propagation.

Tested end-to-end against a live AOSS VECTORSEARCH collection.

…nSearch Serverless

Fixes apache#674

The OpenSearchVectorStore supports both OpenSearch Service domains and
OpenSearch Serverless (AOSS) via service_type (defaults to "serverless").
When running against AOSS, some operations fail due to differences in
SigV4 signing requirements, supported index APIs, bulk ingestion
constraints, and KNN engine capabilities.

This change addresses each AOSS-specific issue while preserving
identical behaviour against provisioned domains:

- Add x-amz-content-sha256 and Content-Length headers before SigV4
  signing (AOSS rejects writes without them)
- Skip _refresh calls on serverless (API not exposed on AOSS)
- Omit custom _id in _bulk action lines on serverless (AOSS rejects
  them with "Document ID is not supported")
- Validate _bulk responses for partial failures (was silently losing
  data on both AOSS and domains)
- Specify FAISS/HNSW engine in createKnnIndex (default NMSLIB on AOSS
  cannot serve filtered KNN queries)
- Add 15s post-create settle on serverless for index propagation

Tested end-to-end against a live AOSS VECTORSEARCH collection in
us-east-1.
@github-actions github-actions Bot added doc-label-missing The Bot applies this label either because none or multiple labels were provided. fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. priority/major Default priority of the PR or issue. labels May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-label-missing The Bot applies this label either because none or multiple labels were provided. fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] OpenSearchVectorStore fails against Amazon OpenSearch Serverless (AOSS)

1 participant