mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Implements the experimental contains filter operator«
This commit is contained in:
parent
1582c7e788
commit
2af9481804
34 changed files with 484 additions and 122 deletions
|
@ -26,6 +26,15 @@ impl Value {
|
|||
panic!("Didn't find any task id in: {self}");
|
||||
}
|
||||
}
|
||||
|
||||
// Panic if the json doesn't contain the `status` field set to "succeeded"
|
||||
#[track_caller]
|
||||
pub fn succeeded(&self) -> &Self {
|
||||
if self["status"] != serde_json::Value::String(String::from("succeeded")) {
|
||||
panic!("Called succeeded on {}", serde_json::to_string_pretty(&self.0).unwrap());
|
||||
}
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl From<serde_json::Value> for Value {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue