fix: search workspace sync indexing (#5437)

* fix: search workspace sync indexing

* chore: update collab rev temporarily

* feat: revert comparison and implement index check

* chore: fixes after merg

* chore: enable search

* chore: disable ai test

---------

Co-authored-by: nathan <nathan@appflowy.io>
This commit is contained in:
Mathias Mogensen
2024-06-05 04:05:51 +02:00
committed by GitHub
parent e4eff7e632
commit 041e3c155a
19 changed files with 368 additions and 73 deletions

View File

@ -124,7 +124,7 @@ impl FolderIndexManagerImpl {
}
fn index_all(&self, indexes: Vec<IndexableData>) -> Result<(), FlowyError> {
if self.is_indexed() || indexes.is_empty() {
if indexes.is_empty() {
return Ok(());
}
@ -411,13 +411,7 @@ impl FolderIndexManager for FolderIndexManagerImpl {
fn index_all_views(&self, views: Vec<Arc<View>>, workspace_id: String) {
let indexable_data = views
.into_iter()
.map(|view| IndexableData {
id: view.id.clone(),
data: view.name.clone(),
icon: view.icon.clone(),
layout: view.layout.clone(),
workspace_id: workspace_id.clone(),
})
.map(|view| IndexableData::from_view(view, workspace_id.clone()))
.collect();
let _ = self.index_all(indexable_data);