stop returning the degraded boolean when a search was cutoff

This commit is contained in:
Tamo 2024-03-14 17:52:08 +01:00
parent ad9192fbbf
commit 038c26c118
2 changed files with 53 additions and 45 deletions

View File

@ -324,7 +324,8 @@ pub struct SearchResult {
#[serde(skip_serializing_if = "Option::is_none")]
pub facet_stats: Option<BTreeMap<String, FacetStats>>,
#[serde(skip_serializing_if = "std::ops::Not::not")]
// This information is only used for analytics purposes
#[serde(skip)]
pub degraded: bool,
}

View File

@ -855,8 +855,9 @@ async fn test_degraded_score_details() {
}),
|response, code| {
meili_snap::snapshot!(code, @"200 OK");
meili_snap::snapshot!(meili_snap::json_string!(response["hits"]), @r###"
[
meili_snap::snapshot!(meili_snap::json_string!(response), @r###"
{
"hits": [
{
"doggos": [
{
@ -902,7 +903,13 @@ async fn test_degraded_score_details() {
"skipped": 0.0
}
}
]
],
"query": "b",
"processingTimeMs": 0,
"limit": 20,
"offset": 0,
"estimatedTotalHits": 3
}
"###);
},
)