Skip to content
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

Elasticsearch / OpenSearch brownfield function does not incorporate meta #3571

Closed
1 task done
tstadel opened this issue Nov 14, 2022 · 0 comments · Fixed by #3572
Closed
1 task done

Elasticsearch / OpenSearch brownfield function does not incorporate meta #3571

tstadel opened this issue Nov 14, 2022 · 0 comments · Fixed by #3572

Comments

@tstadel
Copy link
Member

tstadel commented Nov 14, 2022

Describe the bug
elasticsearch_index_to_document_store incorrectly sets the metadata after calling the constructor of Document. That way, Document's id does not incorporate the meta even though id_hash_keys contains meta key.

Expected behavior
meta is incorporated if id_hash_keys contain 'meta'.

To Reproduce

  1. Ensure your source index contains docs with same contents, but different metas.
  2. run
target_ds = OpenSearchDocumentStore(duplicate_documents="fail", ...)
open_search_index_to_document_store(
    document_store=target_ds, 
    original_index_name=index, 
    original_content_field="content", 
    host=host, 
    username=username, 
    password=password, 
    port=443,
    id_hash_keys=["content", "meta"]
)

FAQ Check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant