mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-04-06 16:18:51 +00:00
Use search_ids() for the full set of matching IDs (lightweight ints, no arbitrary cap) and highlight_hits() for just the displayed page. TantivyRelevanceList now holds ordered IDs for count/selection_data and a small page of rich SearchHit dicts for serialization. Removes the hardcoded 10000 limit that silently truncated results for large collections. Memory usage down ~10% on sorted/paginated search paths at 200 docs, with larger gains expected at scale. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
816 B
Python
26 lines
816 B
Python
from documents.search._backend import SearchHit
|
|
from documents.search._backend import SearchIndexLockError
|
|
from documents.search._backend import SearchMode
|
|
from documents.search._backend import SearchResults
|
|
from documents.search._backend import TantivyBackend
|
|
from documents.search._backend import TantivyRelevanceList
|
|
from documents.search._backend import WriteBatch
|
|
from documents.search._backend import get_backend
|
|
from documents.search._backend import reset_backend
|
|
from documents.search._schema import needs_rebuild
|
|
from documents.search._schema import wipe_index
|
|
|
|
__all__ = [
|
|
"SearchHit",
|
|
"SearchIndexLockError",
|
|
"SearchMode",
|
|
"SearchResults",
|
|
"TantivyBackend",
|
|
"TantivyRelevanceList",
|
|
"WriteBatch",
|
|
"get_backend",
|
|
"needs_rebuild",
|
|
"reset_backend",
|
|
"wipe_index",
|
|
]
|