mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-11 10:32:54 +03:00
change index
This commit is contained in:
parent
781390be76
commit
fa06ec611d
@ -11,7 +11,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
use tantivy::{collector, directory::MmapDirectory, schema, IndexWriter};
|
use tantivy::{collector, directory::MmapDirectory, schema, IndexWriter};
|
||||||
|
|
||||||
const CURRENT_VERSION: u64 = 3; // should not decrease
|
const CURRENT_VERSION: u64 = 4; // should not decrease
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct MetaStorage {
|
struct MetaStorage {
|
||||||
@ -286,7 +286,10 @@ fn index_delta(
|
|||||||
ChangeTag::Insert => change.as_str(),
|
ChangeTag::Insert => change.as_str(),
|
||||||
ChangeTag::Equal => None,
|
ChangeTag::Equal => None,
|
||||||
})
|
})
|
||||||
.collect::<String>();
|
.map(|s| s.trim())
|
||||||
|
.filter(|s| !s.is_empty())
|
||||||
|
.collect::<Vec<&str>>()
|
||||||
|
.join(" ");
|
||||||
|
|
||||||
doc.add_text(index.schema().get_field("diff").unwrap(), changes);
|
doc.add_text(index.schema().get_field("diff").unwrap(), changes);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user