- Newest
- Most votes
- Most comments
The issue you're experiencing with metadata not being persisted or returned when using the S3 Vector Store Java SDK appears to be related to how metadata is handled in S3 Vectors.
Based on the available information, there are a few important points to consider:
-
Metadata in S3 Vectors consists of key-value pairs that can be attached to each vector. By default, all metadata is filterable unless explicitly specified as non-filterable during vector index creation.
-
S3 Vectors supports different types of metadata including string, number, boolean, and lists. There are size limits for metadata per vector, and if these limits are exceeded, operations like PutVectors will return a 400 Bad Request error.
-
When working with metadata in S3 Vectors, you need to ensure that:
- Your metadata keys follow the required naming conventions
- The metadata size doesn't exceed the supported limits
- The metadata is properly formatted as key-value pairs
For your specific issue, here are some potential solutions:
-
Check if your vector index was created with any non-filterable metadata keys. If certain metadata keys were designated as non-filterable during index creation, they might behave differently than expected.
-
Verify that your metadata format is correct. While you're using Document.fromMap() which is generally correct, ensure that the structure matches what S3 Vectors expects.
-
Try using the AWS CLI or another SDK to test if the issue is specific to the Java SDK. The S3 Vectors Embed CLI tool might be helpful for comparison.
-
Consider checking if there are any size limitations you might be hitting, although your example metadata seems minimal.
-
Ensure you're using the latest version of the SDK, as there might have been fixes for similar issues in recent releases.
If the issue persists, it could indeed be a limitation or bug in the current preview version of the S3 Vector Store Java SDK. In that case, you might want to contact AWS Support directly or post on AWS re:Post for more specific guidance, as this is a preview feature that might still have some unresolved issues.
Sources
S3 Vector, metadata error | AWS re:Post
Vector indexes - Amazon Simple Storage Service
Vectors - Amazon Simple Storage Service
Metadata filtering - Amazon Simple Storage Service
answered a year ago
Relevant content
asked a year ago
asked 5 months ago
- AWS OFFICIALUpdated 3 years ago
