Introduce the searchable parameter settings to the Settings update

This commit is contained in:
Clément Renault 2020-11-03 13:20:11 +01:00
parent 68d783145b
commit e48630da72
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
5 changed files with 243 additions and 22 deletions

View file

@ -103,8 +103,19 @@ impl<'a> UpdateBuilder<'a> {
self,
wtxn: &'t mut heed::RwTxn<'i, 'u>,
index: &'i Index,
) -> Settings<'t, 'u, 'i>
) -> Settings<'a, 't, 'u, 'i>
{
Settings::new(wtxn, index)
let mut builder = Settings::new(wtxn, index);
builder.log_every_n = self.log_every_n;
builder.max_nb_chunks = self.max_nb_chunks;
builder.max_memory = self.max_memory;
builder.linked_hash_map_size = self.linked_hash_map_size;
builder.chunk_compression_type = self.chunk_compression_type;
builder.chunk_compression_level = self.chunk_compression_level;
builder.chunk_fusing_shrink_size = self.chunk_fusing_shrink_size;
builder.thread_pool = self.thread_pool;
builder
}
}