From b76fc64325a2d7fee44572cd3ee969e84c35d57d Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Sat, 30 May 2026 17:00:00 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20ajout=20m=C3=A9thode=20is=5Fstale()=20ma?= =?UTF-8?q?nquante=20dans=20InvertedIndex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/search.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/search.py b/backend/search.py index 6654b0b..6a98e05 100644 --- a/backend/search.py +++ b/backend/search.py @@ -361,6 +361,10 @@ class InvertedIndex: self._sorted_tokens: "SortedList" = SortedList() 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: """Rebuild inverted index from the global ``index`` dict.