mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 00:31:02 +00:00
Fix old test
This commit is contained in:
@ -19,7 +19,9 @@ use crate::update::{
|
|||||||
};
|
};
|
||||||
use crate::vector::settings::{EmbedderSource, EmbeddingSettings};
|
use crate::vector::settings::{EmbedderSource, EmbeddingSettings};
|
||||||
use crate::vector::RuntimeEmbedders;
|
use crate::vector::RuntimeEmbedders;
|
||||||
use crate::{db_snap, obkv_to_json, Filter, FilterableAttributesRule, Index, Search, SearchResult};
|
use crate::{
|
||||||
|
db_snap, obkv_to_json, Filter, FilterableAttributesRule, Index, Search, SearchResult, UserError,
|
||||||
|
};
|
||||||
|
|
||||||
pub(crate) struct TempIndex {
|
pub(crate) struct TempIndex {
|
||||||
pub inner: Index,
|
pub inner: Index,
|
||||||
@ -1341,8 +1343,8 @@ fn vectors_are_never_indexed_as_searchable_or_filterable() {
|
|||||||
let results = search
|
let results = search
|
||||||
.filter(Filter::from_str("_vectors.doggo = 6789").unwrap().unwrap())
|
.filter(Filter::from_str("_vectors.doggo = 6789").unwrap().unwrap())
|
||||||
.execute()
|
.execute()
|
||||||
.unwrap();
|
.unwrap_err();
|
||||||
assert!(results.candidates.is_empty());
|
assert!(matches!(results, Error::UserError(UserError::InvalidFilter(_))));
|
||||||
|
|
||||||
index
|
index
|
||||||
.update_settings(|settings| {
|
.update_settings(|settings| {
|
||||||
@ -1373,6 +1375,6 @@ fn vectors_are_never_indexed_as_searchable_or_filterable() {
|
|||||||
let results = search
|
let results = search
|
||||||
.filter(Filter::from_str("_vectors.doggo = 6789").unwrap().unwrap())
|
.filter(Filter::from_str("_vectors.doggo = 6789").unwrap().unwrap())
|
||||||
.execute()
|
.execute()
|
||||||
.unwrap();
|
.unwrap_err();
|
||||||
assert!(results.candidates.is_empty());
|
assert!(matches!(results, Error::UserError(UserError::InvalidFilter(_))));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user