fix: ajout méthode is_stale() manquante dans InvertedIndex
This commit is contained in:
parent
b92fd3da08
commit
b76fc64325
@ -361,6 +361,10 @@ class InvertedIndex:
|
|||||||
self._sorted_tokens: "SortedList" = SortedList()
|
self._sorted_tokens: "SortedList" = SortedList()
|
||||||
self._ready: bool = False # True after initial build
|
self._ready: bool = False # True after initial build
|
||||||
|
|
||||||
|
def is_stale(self) -> bool:
|
||||||
|
"""Return True if the index has not been built yet."""
|
||||||
|
return not self._ready
|
||||||
|
|
||||||
def rebuild(self) -> None:
|
def rebuild(self) -> None:
|
||||||
"""Rebuild inverted index from the global ``index`` dict.
|
"""Rebuild inverted index from the global ``index`` dict.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user