|
|
|
|
|
|
|
|
all_documents=all_documents, |
|
|
all_documents=all_documents, |
|
|
retrieval_method=retrieval_method, |
|
|
retrieval_method=retrieval_method, |
|
|
exceptions=exceptions, |
|
|
exceptions=exceptions, |
|
|
|
|
|
document_ids_filter=document_ids_filter, |
|
|
) |
|
|
) |
|
|
) |
|
|
) |
|
|
concurrent.futures.wait(futures, timeout=30, return_when=concurrent.futures.ALL_COMPLETED) |
|
|
concurrent.futures.wait(futures, timeout=30, return_when=concurrent.futures.ALL_COMPLETED) |
|
|
|
|
|
|
|
|
all_documents: list, |
|
|
all_documents: list, |
|
|
retrieval_method: str, |
|
|
retrieval_method: str, |
|
|
exceptions: list, |
|
|
exceptions: list, |
|
|
|
|
|
document_ids_filter: Optional[list[str]] = None, |
|
|
): |
|
|
): |
|
|
with flask_app.app_context(): |
|
|
with flask_app.app_context(): |
|
|
try: |
|
|
try: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vector_processor = Vector(dataset=dataset) |
|
|
vector_processor = Vector(dataset=dataset) |
|
|
|
|
|
|
|
|
documents = vector_processor.search_by_full_text(cls.escape_query_for_search(query), top_k=top_k) |
|
|
|
|
|
|
|
|
documents = vector_processor.search_by_full_text( |
|
|
|
|
|
cls.escape_query_for_search(query), top_k=top_k, document_ids_filter=document_ids_filter |
|
|
|
|
|
) |
|
|
if documents: |
|
|
if documents: |
|
|
if ( |
|
|
if ( |
|
|
reranking_model |
|
|
reranking_model |