fix(vector-stores): add agent_id and run_id to Elasticsearch/OpenSearch default mappings (#4906)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jessai2099
2026-04-20 23:10:59 +05:30
committed by GitHub
co-authored by Claude Sonnet 4.6
parent 8ba225cec8
commit 573e5212a4
4 changed files with 24 additions and 2 deletions
+8 -1
View File
@@ -66,7 +66,14 @@ class ElasticsearchDB(VectorStoreBase):
"index": True,
"similarity": "cosine",
},
"metadata": {"type": "object", "properties": {"user_id": {"type": "keyword"}}},
"metadata": {
"type": "object",
"properties": {
"user_id": {"type": "keyword"},
"agent_id": {"type": "keyword"},
"run_id": {"type": "keyword"},
},
},
}
},
}
+8 -1
View File
@@ -55,7 +55,14 @@ class OpenSearchDB(VectorStoreBase):
"dimension": self.embedding_model_dims,
"method": {"engine": "nmslib", "name": "hnsw", "space_type": "cosinesimil"},
},
"metadata": {"type": "object", "properties": {"user_id": {"type": "keyword"}}},
"metadata": {
"type": "object",
"properties": {
"user_id": {"type": "keyword"},
"agent_id": {"type": "keyword"},
"run_id": {"type": "keyword"},
},
},
}
},
}