mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-18 18:56:25 +00:00
style improvement
This commit is contained in:
@ -1896,7 +1896,7 @@ impl Index {
|
||||
field_id_docid_facet_strings,
|
||||
vector_store,
|
||||
embedder_category_id,
|
||||
cellulite: _,
|
||||
cellulite,
|
||||
documents,
|
||||
} = self;
|
||||
|
||||
@ -1976,13 +1976,10 @@ impl Index {
|
||||
panic!("Cellulite database count has changed, please update the code accordingly.")
|
||||
}
|
||||
};
|
||||
sizes.insert("cellulite_item", self.cellulite.item_db_stats(rtxn).map(compute_size)?);
|
||||
sizes.insert("cellulite_cell", self.cellulite.cell_db_stats(rtxn).map(compute_size)?);
|
||||
sizes.insert("cellulite_update", self.cellulite.update_db_stats(rtxn).map(compute_size)?);
|
||||
sizes.insert(
|
||||
"cellulite_metadata",
|
||||
self.cellulite.metadata_db_stats(rtxn).map(compute_size)?,
|
||||
);
|
||||
sizes.insert("cellulite_item", cellulite.item_db_stats(rtxn).map(compute_size)?);
|
||||
sizes.insert("cellulite_cell", cellulite.cell_db_stats(rtxn).map(compute_size)?);
|
||||
sizes.insert("cellulite_update", cellulite.update_db_stats(rtxn).map(compute_size)?);
|
||||
sizes.insert("cellulite_metadata", cellulite.metadata_db_stats(rtxn).map(compute_size)?);
|
||||
|
||||
Ok(sizes)
|
||||
}
|
||||
|
@ -632,7 +632,6 @@ pub(crate) fn write_typed_chunk_into_index(
|
||||
let mut iter = merger.into_stream_merger_iter()?;
|
||||
while let Some((key, value)) = iter.next()? {
|
||||
// convert the key back to a u32 (4 bytes)
|
||||
tracing::warn!("Key: {:?}, length: {}", key, key.len());
|
||||
let docid = key.try_into().map(DocumentId::from_be_bytes).unwrap();
|
||||
|
||||
let deladd_obkv = KvReaderDelAdd::from_slice(value);
|
||||
@ -640,14 +639,9 @@ pub(crate) fn write_typed_chunk_into_index(
|
||||
index.cellulite.delete(wtxn, docid)?;
|
||||
}
|
||||
if let Some(value) = deladd_obkv.get(DelAdd::Addition) {
|
||||
tracing::warn!("Adding one geojson to cellulite");
|
||||
|
||||
let geojson =
|
||||
geojson::GeoJson::from_reader(value).map_err(UserError::SerdeJson)?;
|
||||
index
|
||||
.cellulite
|
||||
.add(wtxn, docid, &geojson)
|
||||
.map_err(InternalError::CelluliteError)?;
|
||||
index.cellulite.add(wtxn, docid, &geojson)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user