diff --git a/http-ui/Cargo.lock b/http-ui/Cargo.lock
index 1ef0ccfbd..cb5103003 100644
--- a/http-ui/Cargo.lock
+++ b/http-ui/Cargo.lock
@@ -1335,6 +1335,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fe9037165d7023b1228bc4ae9a2fa1a2b0095eca6c2998c624723dfd01314a5"
dependencies = [
"num-traits",
+ "serde",
]
[[package]]
diff --git a/http-ui/public/script.js b/http-ui/public/script.js
index f935cc07d..9887f06ce 100644
--- a/http-ui/public/script.js
+++ b/http-ui/public/script.js
@@ -57,7 +57,7 @@ $('#query, #filters').on('input', function () {
}
// Create the newly discovered facets
- let diff = diffArray(data.facets[facet_name], selected_values);
+ let diff = diffArray(Object.keys(data.facets[facet_name]), selected_values);
for (value of diff) {
let option = $('')
.text(value)
diff --git a/http-ui/src/main.rs b/http-ui/src/main.rs
index 6e4f42a4e..54f87c3e6 100644
--- a/http-ui/src/main.rs
+++ b/http-ui/src/main.rs
@@ -1,4 +1,4 @@
-use std::collections::{HashMap, HashSet};
+use std::collections::{BTreeMap, HashMap, HashSet};
use std::fmt::Display;
use std::fs::{File, create_dir_all};
use std::net::SocketAddr;
@@ -29,6 +29,7 @@ use warp::filters::ws::Message;
use warp::{Filter, http::Response};
use meilisearch_tokenizer::{Analyzer, AnalyzerConfig};
+use milli::facet::FacetValue;
use milli::update::UpdateIndexingStep::*;
use milli::update::{UpdateBuilder, IndexDocumentsMethod, UpdateFormat};
use milli::{obkv_to_json, Index, UpdateStore, SearchResult, FacetCondition};
@@ -652,7 +653,7 @@ async fn main() -> anyhow::Result<()> {
struct Answer {
documents: Vec