mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Improve code quality
This commit is contained in:
parent
59a1c5d9a7
commit
4a179fb3c0
9 changed files with 25 additions and 48 deletions
|
@ -1,7 +1,7 @@
|
|||
use std::collections::HashSet;
|
||||
use std::ops::{Bound, RangeBounds};
|
||||
|
||||
use meilisearch_types::batches::{Batch, BatchEmbeddingStats, BatchId};
|
||||
use meilisearch_types::batches::{Batch, EmbedderStatsView, BatchId};
|
||||
use meilisearch_types::heed::types::{DecodeIgnore, SerdeBincode, SerdeJson, Str};
|
||||
use meilisearch_types::heed::{Database, Env, RoTxn, RwTxn, WithoutTls};
|
||||
use meilisearch_types::milli::{CboRoaringBitmapCodec, RoaringBitmapCodec, BEU32};
|
||||
|
@ -92,10 +92,7 @@ impl BatchQueue {
|
|||
}
|
||||
|
||||
pub(crate) fn get_batch(&self, rtxn: &RoTxn, batch_id: BatchId) -> Result<Option<Batch>> {
|
||||
println!("Got batch from db {batch_id:?}");
|
||||
let r = Ok(self.all_batches.get(rtxn, &batch_id)?);
|
||||
println!("Got batch from db => {:?}", r);
|
||||
r
|
||||
Ok(self.all_batches.get(rtxn, &batch_id)?)
|
||||
}
|
||||
|
||||
/// Returns the whole set of batches that belongs to this index.
|
||||
|
@ -174,8 +171,6 @@ impl BatchQueue {
|
|||
pub(crate) fn write_batch(&self, wtxn: &mut RwTxn, batch: ProcessingBatch) -> Result<()> {
|
||||
let old_batch = self.all_batches.get(wtxn, &batch.uid)?;
|
||||
|
||||
println!("Saving batch: {:?}", batch.embedder_stats);
|
||||
|
||||
self.all_batches.put(
|
||||
wtxn,
|
||||
&batch.uid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue