コード例 #1
0
 def test_update_and_search_no_update(
     self,
     index_builder: IndexBuilder,
     index_searcher: IndexSearcher,
 ) -> None:
     index_builder._mark_index_as_built()
     index_builder.build_changed_sub_indices("something")
     assert not list(index_searcher.search("**"))
コード例 #2
0
 def test_update_and_search_with_update(
     self,
     index_builder: IndexBuilder,
     index_searcher: IndexSearcher,
 ) -> None:
     index_builder._mark_index_as_built()
     index_builder.build_changed_sub_indices("some_change_dependent_whatever")
     assert list(index_searcher.search("**")) == [
         ("Change-dependent", [SearchResult(title="change_dependent", url="")]),
     ]