Spaces:
Sleeping
Sleeping
Download scripts/finalize_collection.py from dynamodenis254/docu-search: direct link, hf CLI and curl.
- Browser
- Download file 529 Bytes
-
https://huggingface.co/spaces/dynamodenis254/docu-search/resolve/main/scripts/finalize_collection.py
- Command line
-
hf download hf://spaces/dynamodenis254/docu-search/scripts/finalize_collection.py
-
curl -L -o finalize_collection.py https://huggingface.co/spaces/dynamodenis254/docu-search/resolve/main/scripts/finalize_collection.py
529 Bytes
| """Switch the collection from bulk-ingest mode to search mode. | |
| Run this ONCE after your initial big ingest finishes. Sets dense HNSW | |
| to m=16, turns on indexing (threshold=1000), and waits for the | |
| collection status to go green before returning. | |
| Usage: | |
| python -m scripts.finalize_collection | |
| """ | |
| import logging | |
| from backend.core.qdrant_client import finalize_indexing | |
| logging.basicConfig(level=logging.INFO, format="%(levelname)s %(message)s") | |
| if __name__ == "__main__": | |
| finalize_indexing(wait=True) | |
| print("done") | |