Skip to content

Commit

Permalink
Update bm25_retriever.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sahusiddharth authored Dec 23, 2023
1 parent c074b0a commit 02e83ac
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ def from_dict(cls, data: Dict[str, Any]) -> "ElasticsearchBM25Retriever":

@component.output_types(documents=List[Document])
def run(self, query: str, top_k: Optional[int] = None):
"""
Retrieve documents using a vector similarity metric.
:param query_embedding: Embedding of the query.
:param top_k: Maximum number of Documents to return
:return: List of Document similar to `query_embedding`.
"""
docs = self._document_store._bm25_retrieval(
query=query,
filters=self._filters,
Expand Down

0 comments on commit 02e83ac

Please sign in to comment.