mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-28 01:01:00 +00:00
Update tests using filterable attributes rules
**Changes:** Replace the BTreeSet<String> by Vec<FilterableAttributesRule> without changing the test results **Impact:** - None
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
use big_s::S;
|
||||
use bumpalo::Bump;
|
||||
use heed::EnvOpenOptions;
|
||||
use maplit::hashset;
|
||||
use milli::documents::mmap_from_objects;
|
||||
use milli::progress::Progress;
|
||||
use milli::update::new::indexer;
|
||||
use milli::update::{IndexerConfig, Settings};
|
||||
use milli::vector::EmbeddingConfigs;
|
||||
use milli::{FacetDistribution, Index, Object, OrderBy};
|
||||
use milli::{FacetDistribution, FilterableAttributesRule, Index, Object, OrderBy};
|
||||
use serde_json::{from_value, json};
|
||||
|
||||
#[test]
|
||||
@ -21,10 +20,10 @@ fn test_facet_distribution_with_no_facet_values() {
|
||||
let config = IndexerConfig::default();
|
||||
let mut builder = Settings::new(&mut wtxn, &index, &config);
|
||||
|
||||
builder.set_filterable_fields(hashset! {
|
||||
S("genres"),
|
||||
S("tags"),
|
||||
});
|
||||
builder.set_filterable_fields(vec![
|
||||
FilterableAttributesRule::Field(S("genres")),
|
||||
FilterableAttributesRule::Field(S("tags")),
|
||||
]);
|
||||
builder.execute(|_| (), || false).unwrap();
|
||||
wtxn.commit().unwrap();
|
||||
|
||||
|
Reference in New Issue
Block a user