forked from Archives/langchain
Refactor similarity_search function in elastic_vector_search.py (#2761)
Optimization :Limit search results when k < 10 Fix issue when k > 10: Elasticsearch will return only 10 docs [default-search-result](https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html) By default, searches return the top 10 matching hits Add size parameter to the search request to limit the number of returned results from Elasticsearch. Remove slicing of the hits list, since the response will already contain the desired number of results.fix_agent_callbacks
parent
1cc7ea333c
commit
9907cb0485
Loading…
Reference in New Issue