GNOME Bugzilla – Bug 683495
search-engine: Reset duplicates cache when search finishes
Last modified: 2012-09-06 13:42:00 UTC
See patch. To reproduce: Have a file called 'foobar', type 'foo' until the search result appears, append 'bar' to the search term - the result should obviously not disappear :-)
Created attachment 223645 [details] [review] search-engine: Reset duplicates cache when search finishes Fixing the handling of duplicated search results in commit 7f04862 exposed a different bug: as the duplicates cache is never reset, previously matched results are ignored in subsequent searches (e.g. when adding/removing characters to the search terms that should not change the result set).
Review of attachment 223645 [details] [review]: ::: libnautilus-private/nautilus-search-engine.c @@ +166,3 @@ nautilus_search_provider_finished (NAUTILUS_SEARCH_PROVIDER (engine)); + g_hash_table_remove_all (engine->details->uris); + } Looks good, but what about the case when we error out instead? I think we should also clear caches in that case.
Created attachment 223648 [details] [review] search-engine: Reset duplicates cache when search finishes (In reply to comment #2) > Looks good, but what about the case when we error out instead? I think we > should also clear caches in that case. Yeah, sounds right - slightly off-topic: I noticed that the current code assumes that either all providers succeed or err out, is that assumption really valid?
Review of attachment 223648 [details] [review]: Thanks, this looks good
(In reply to comment #3) > Yeah, sounds right - slightly off-topic: I noticed that the current code > assumes that either all providers succeed or err out, is that assumption really > valid? It's not; I think "error" should also imply "finished", but we don't enforce this assumption anywhere - I think we should.
Attachment 223648 [details] pushed as 41714d9 - search-engine: Reset duplicates cache when search finishes