mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 08:41:00 +00:00
Clean code
This commit is contained in:
@ -1776,7 +1776,7 @@ impl Index {
|
|||||||
embedder_info.embedder_id,
|
embedder_info.embedder_id,
|
||||||
config.config.quantized(),
|
config.config.quantized(),
|
||||||
);
|
);
|
||||||
let embeddings = reader.item_vectors(rtxn, docid)?; // MARKER
|
let embeddings = reader.item_vectors(rtxn, docid)?;
|
||||||
res.insert(
|
res.insert(
|
||||||
config.name.to_owned(),
|
config.name.to_owned(),
|
||||||
(embeddings, embedder_info.embedding_status.must_regenerate(docid)),
|
(embeddings, embedder_info.embedding_status.must_regenerate(docid)),
|
||||||
|
@ -234,11 +234,9 @@ impl<'a> Filter<'a> {
|
|||||||
pub fn evaluate(&self, rtxn: &heed::RoTxn<'_>, index: &Index) -> Result<RoaringBitmap> {
|
pub fn evaluate(&self, rtxn: &heed::RoTxn<'_>, index: &Index) -> Result<RoaringBitmap> {
|
||||||
// to avoid doing this for each recursive call we're going to do it ONCE ahead of time
|
// to avoid doing this for each recursive call we're going to do it ONCE ahead of time
|
||||||
let fields_ids_map = index.fields_ids_map(rtxn)?;
|
let fields_ids_map = index.fields_ids_map(rtxn)?;
|
||||||
let filterable_attributes_rules = dbg!(index.filterable_attributes_rules(rtxn)?);
|
let filterable_attributes_rules = index.filterable_attributes_rules(rtxn)?;
|
||||||
|
|
||||||
for fid in self.condition.fids(MAX_FILTER_DEPTH) {
|
for fid in self.condition.fids(MAX_FILTER_DEPTH) {
|
||||||
println!("{fid:?}");
|
|
||||||
|
|
||||||
let attribute = fid.value();
|
let attribute = fid.value();
|
||||||
if matching_features(attribute, &filterable_attributes_rules)
|
if matching_features(attribute, &filterable_attributes_rules)
|
||||||
.is_some_and(|(_, features)| features.is_filterable())
|
.is_some_and(|(_, features)| features.is_filterable())
|
||||||
|
@ -9,7 +9,6 @@ pub(super) struct VectorFilter<'a> {
|
|||||||
embedder_token: Option<Token<'a>>,
|
embedder_token: Option<Token<'a>>,
|
||||||
fragment_token: Option<Token<'a>>,
|
fragment_token: Option<Token<'a>>,
|
||||||
user_provided: bool,
|
user_provided: bool,
|
||||||
// TODO: not_user_provided: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -966,7 +966,7 @@ impl<'a, 'i> Transform<'a, 'i> {
|
|||||||
// some user provided, remove only the ids that are not user provided
|
// some user provided, remove only the ids that are not user provided
|
||||||
let to_delete = arroy.items_in_store(wtxn, *fragment_id, |items| {
|
let to_delete = arroy.items_in_store(wtxn, *fragment_id, |items| {
|
||||||
items - infos.embedding_status.user_provided_docids()
|
items - infos.embedding_status.user_provided_docids()
|
||||||
})?; // MARKER
|
})?;
|
||||||
|
|
||||||
for to_delete in to_delete {
|
for to_delete in to_delete {
|
||||||
arroy.del_item_in_store(wtxn, to_delete, *fragment_id, dimensions)?;
|
arroy.del_item_in_store(wtxn, to_delete, *fragment_id, dimensions)?;
|
||||||
|
Reference in New Issue
Block a user