add vector field for other vectordb (#7051)
This commit is contained in:
parent
aad02113c6
commit
80c94f02e9
10 changed files with 23 additions and 14 deletions
|
|
@ -192,7 +192,9 @@ class OpenSearchVector(BaseVector):
|
|||
docs = []
|
||||
for hit in response['hits']['hits']:
|
||||
metadata = hit['_source'].get(Field.METADATA_KEY.value)
|
||||
doc = Document(page_content=hit['_source'].get(Field.CONTENT_KEY.value), metadata=metadata)
|
||||
vector = hit['_source'].get(Field.VECTOR.value)
|
||||
page_content = hit['_source'].get(Field.CONTENT_KEY.value)
|
||||
doc = Document(page_content=page_content, vector=vector, metadata=metadata)
|
||||
docs.append(doc)
|
||||
|
||||
return docs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue