diff options
author | Jeremie Laval <jeremie.laval@gmail.com> | 2012-03-30 22:21:57 +0400 |
---|---|---|
committer | Jeremie Laval <jeremie.laval@gmail.com> | 2012-03-30 22:21:57 +0400 |
commit | 3ba92d3eb4eb46ea044e08ab7a5ff3f0404cfcc9 (patch) | |
tree | 3689e98bec9b8311740b89f00a8ece359a640f4b /MyDocument.cs | |
parent | 6ac9385b120baf8ec91d27107907abed6f32e343 (diff) |
[macdoc] Instantiate the index if it has been deemed fresh enough elsewhere.
This might still be subject to concurrent problem if index has been created but the property has not been sent and if subsequent event has already been fired.
Diffstat (limited to 'MyDocument.cs')
-rw-r--r-- | MyDocument.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MyDocument.cs b/MyDocument.cs index 530604b..28fd8e8 100644 --- a/MyDocument.cs +++ b/MyDocument.cs @@ -123,7 +123,7 @@ namespace macdoc { AppDelegate.IndexUpdateManager.UpdaterChange += ToggleSearchCreationStatus; searchIndex = AppDelegate.Root.GetSearchIndex (); - mdocSearch = new IndexSearcher (null); + mdocSearch = new IndexSearcher (AppDelegate.IndexUpdateManager.IsFresh ? AppDelegate.Root.GetIndex () : null); indexResults.Source = new IndexDataSource (mdocSearch); multipleMatchResults.Source = new MultipleMatchDataSource (this); searchResults.Source = new ResultDataSource (); |