Skip to content

Commit 90d621e

Browse files
committed
fix: update OpenSearch Serverless mappings
1 parent f9f5c93 commit 90d621e

File tree

1 file changed

+14
-9
lines changed
  • lambda/aws-rag-appsync-stepfn-opensearch/embeddings_job/src

1 file changed

+14
-9
lines changed

lambda/aws-rag-appsync-stepfn-opensearch/embeddings_job/src/lambda.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,20 @@ def process_documents_in_aoss(index_exists, shards, http_auth):
150150
},
151151
"mappings": {
152152
"properties": {
153-
"osha_vector": {
154-
"type": "knn_vector",
155-
"dimension": 1536,
156-
"method": {
157-
"engine": "faiss",
158-
"name": "hnsw",
159-
"space_type": "l2"
160-
}
161-
}
153+
"vector_field": {
154+
"type": "knn_vector",
155+
"dimension": 1536,
156+
"method": {
157+
"engine": "nmslib",
158+
"space_type": "cosinesimil",
159+
"name": "hnsw",
160+
"parameters": {},
161+
}
162+
},
163+
"id": {
164+
"type": "text",
165+
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
166+
},
162167
}
163168
}
164169
}

0 commit comments

Comments
 (0)