-
Notifications
You must be signed in to change notification settings - Fork 65
Fix fetching of parent doc properties during OpenSearch read #1148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clean up the commented code before merging
|
||
logger.info(f"Parent IDs: {parent_ids}") | ||
return pd.DataFrame([{"_source": {"doc_id": parent_id, "parent_id": parent_id}} for parent_id in parent_ids]) | ||
# logger.info(f"Parent IDs: {parent_ids}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you delete
|
||
os_client = client._client | ||
records = OpenSearchReaderQueryResponse([doc], os_client) | ||
# doc["_source"]["properties"] = json.loads(doc["_source"]["properties"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
|
||
parent_doc = os_client.get( | ||
index=self._query_params.index_name, id=doc_id | ||
) # , _source_includes=["properties"])["_source"]["properties"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comments
records = OpenSearchReaderQueryResponse([parent_doc], os_client) | ||
docs = records.to_docs(query_params=self._query_params) | ||
|
||
# properties[DocumentPropertyTypes.SOURCE] = DocumentSource.DOCUMENT_RECONSTRUCTION_PARENT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
No description provided.