mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01:00
Fix benchmarks
This commit is contained in:
parent
993aa1321c
commit
f9029727e0
@ -11,7 +11,7 @@ use milli::heed::EnvOpenOptions;
|
|||||||
use milli::update::{
|
use milli::update::{
|
||||||
IndexDocuments, IndexDocumentsConfig, IndexDocumentsMethod, IndexerConfig, Settings,
|
IndexDocuments, IndexDocumentsConfig, IndexDocumentsMethod, IndexerConfig, Settings,
|
||||||
};
|
};
|
||||||
use milli::{Filter, Index, Object};
|
use milli::{Filter, Index, Object, TermsMatchingStrategy};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
|
|
||||||
pub struct Conf<'a> {
|
pub struct Conf<'a> {
|
||||||
@ -119,7 +119,7 @@ pub fn run_benches(c: &mut criterion::Criterion, confs: &[Conf]) {
|
|||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
let rtxn = index.read_txn().unwrap();
|
let rtxn = index.read_txn().unwrap();
|
||||||
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(TermsMatchingStrategy::default());
|
||||||
if let Some(filter) = conf.filter {
|
if let Some(filter) = conf.filter {
|
||||||
let filter = Filter::from_str(filter).unwrap().unwrap();
|
let filter = Filter::from_str(filter).unwrap().unwrap();
|
||||||
search.filter(filter);
|
search.filter(filter);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user