diff --git a/server/src/search/mod.rs b/server/src/search/mod.rs index 8ead047c2..0c9092fde 100644 --- a/server/src/search/mod.rs +++ b/server/src/search/mod.rs @@ -185,10 +185,10 @@ async fn cached_geoentry_search( let ms_url = std::env::var("MIELI_URL").unwrap_or_else(|_| "http://localhost:7700".to_string()); let Ok(client) = Client::new(ms_url, std::env::var("MEILI_MASTER_KEY").ok()) else { error!("Failed to create a meilisearch client"); - if search_addresses { - return search_executor::address_search(&q).await.0; + return if search_addresses { + search_executor::address_search(&q).await.0 } else { - return vec![]; + vec![] } }; let geoentry_search = search_executor::do_geoentry_search(&client, &q, highlighting, limits); diff --git a/server/src/search/search_executor/mod.rs b/server/src/search/search_executor/mod.rs index ddab28ac8..af9e38e66 100644 --- a/server/src/search/search_executor/mod.rs +++ b/server/src/search/search_executor/mod.rs @@ -138,7 +138,7 @@ pub async fn address_search(q: &str) -> LimitedVec { let subtext = r.address.serialise(); ResultEntry { hit: Default::default(), - id: r.osm_id.to_string(), + id: format!("osm_{}", r.osm_id), r#type: r.address_type, name: r.address.road.unwrap_or(r.name), subtext,