fix the benchmarks

This commit is contained in:
Tamo 2021-11-06 16:03:49 +01:00
parent 075d9c97c0
commit 5c01e9bf7c
No known key found for this signature in database
GPG Key ID: 20CD8020AFA88D69

View File

@ -9,7 +9,7 @@ use criterion::BenchmarkId;
use heed::EnvOpenOptions; use heed::EnvOpenOptions;
use milli::documents::DocumentBatchReader; use milli::documents::DocumentBatchReader;
use milli::update::{IndexDocumentsMethod, Settings, UpdateBuilder}; use milli::update::{IndexDocumentsMethod, Settings, UpdateBuilder};
use milli::{FilterCondition, Index}; use milli::{Filter, Index};
use serde_json::{Map, Value}; use serde_json::{Map, Value};
pub struct Conf<'a> { pub struct Conf<'a> {
@ -117,7 +117,7 @@ pub fn run_benches(c: &mut criterion::Criterion, confs: &[Conf]) {
let mut search = index.search(&rtxn); let mut search = index.search(&rtxn);
search.query(query).optional_words(conf.optional_words); search.query(query).optional_words(conf.optional_words);
if let Some(filter) = conf.filter { if let Some(filter) = conf.filter {
let filter = FilterCondition::from_str(&rtxn, &index, filter).unwrap(); let filter = Filter::from_str(filter).unwrap();
search.filter(filter); search.filter(filter);
} }
if let Some(sort) = &conf.sort { if let Some(sort) = &conf.sort {