Skip to content

Commit

Permalink
Update docstring for embedding_field and embedding_dim (#208)
Browse files Browse the repository at this point in the history
'embedding_field' and 'embedding_dim' are useful not only for EmbeddingRetriever but also for DensePassageRetriever. Hence, could be good if you generalise it as "dense retriever".
  • Loading branch information
antoniolanza1996 authored Jul 8, 2020
1 parent bda333d commit 4b9954c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions haystack/database/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def __init__(
If no Reader is used (e.g. in FAQ-Style QA) the plain content of this field will just be returned.
:param name_field: Name of field that contains the title of the the doc
:param external_source_id_field: If you have an external id (= non-elasticsearch) that identifies your documents, you can specify it here.
:param embedding_field: Name of field containing an embedding vector (Only needed when using the EmbeddingRetriever on top)
:param embedding_dim: Dimensionality of embedding vector (Only needed when using the EmbeddingRetriever on top)
:param embedding_field: Name of field containing an embedding vector (Only needed when using a dense retriever (e.g. DensePassageRetriever, EmbeddingRetriever) on top)
:param embedding_dim: Dimensionality of embedding vector (Only needed when using a dense retriever (e.g. DensePassageRetriever, EmbeddingRetriever) on top)
:param custom_mapping: If you want to use your own custom mapping for creating a new index in Elasticsearch, you can supply it here as a dictionary.
:param excluded_meta_data: Name of fields in Elasticsearch that should not be returned (e.g. [field_one, field_two]).
Helpful if you have fields with long, irrelevant content that you don't want to display in results (e.g. embedding vectors).
Expand Down Expand Up @@ -353,4 +353,4 @@ def get_all_documents_in_index(self, index: str, filters: Optional[dict] = None)
body["query"]["bool"]["filter"] = {"term": filters}
result = scan(self.client, query=body, index=index)

return result
return result

0 comments on commit 4b9954c

Please sign in to comment.