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

Despite return_embedding=False SearchEngineDocumentStore.query retrieves embedding_field #3661

Closed
1 task done
tstadel opened this issue Dec 2, 2022 · 0 comments · Fixed by #3662
Closed
1 task done

Comments

@tstadel
Copy link
Member

tstadel commented Dec 2, 2022

Describe the bug
If we set return_embedding=False SearchEngineDocumentStore.query still requests all fields and does not exclude the embedding field. This slows down sparse retrieval if the index has embeddings as all embedding vectors unnecessarily go over the wire.

Expected behavior
SearchEngineDocumentStore requests embeddings only when needed.

Additional context
For batched queries this can reduce latency by 9%.

To Reproduce

  1. create index with embeddings using OpenSearchDocumentStore
  2. set return_embedding=False
  3. run logging.getLogger("opensearch").setLevel(logging.DEBUG)
  4. run document_store.query
  5. see embeddings in response

FAQ Check

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