diff --git a/server/src/calendar/models.rs b/server/src/db/calendar.rs similarity index 63% rename from server/src/calendar/models.rs rename to server/src/db/calendar.rs index a72177add..bd0004101 100644 --- a/server/src/calendar/models.rs +++ b/server/src/db/calendar.rs @@ -1,52 +1,39 @@ +use crate::external::connectum::ConnectumEvent; +use crate::limited::hash_map::LimitedHashMap; use crate::limited::vec::LimitedVec; use chrono::{DateTime, Utc}; -use serde::{Deserialize, Serialize}; use sqlx::PgPool; +use std::collections::HashMap; use std::fmt::{Debug, Display, Formatter}; use tracing::debug; use tracing::error; use tracing::warn; -#[derive(Serialize, Deserialize, Clone, utoipa::ToSchema)] pub struct CalendarLocation { - /// Structured, globaly unique room code - /// - /// Included to enable multi-room calendars. - /// Format: BUILDING.LEVEL.NUMBER - #[schema(examples("5602.EG.001", "5121.EG.003"))] pub key: String, - /// name of the entry in a human-readable form - #[schema(examples( - "5602.EG.001 (MI HS 1, Friedrich L. Bauer Hörsaal)", - "5121.EG.003 (Computerraum)" - ))] pub name: String, - /// last time the calendar was scraped for this room - #[schema(examples("2039-01-19T03:14:07+01:00", "2042-01-07T00:00:00 UTC"))] pub last_calendar_scrape_at: Option>, - /// Link to the calendar of the room - #[schema(examples( - "https://campus.tum.de/tumonline/tvKalender.wSicht?cOrg=19691&cRes=12543&cReadonly=J", - "https://campus.tum.de/tumonline/tvKalender.wSicht?cOrg=19691&cRes=12559&cReadonly=J" - ))] pub calendar_url: Option, - /// Type of the entry in a human-readable form - #[schema(examples("Serverraum", "Büro"))] pub type_common_name: String, - /// type of the entry - /// - /// TODO document as a n enum with the following choices: - /// - `room` - /// - `building` - /// - `joined_building` - /// - `area` - /// - `site` - /// - `campus` - /// - `poi` - #[schema(examples("room", "building", "joined_building", "area", "site", "campus", "poi"))] pub r#type: String, } +impl CalendarLocation { + #[tracing::instrument(skip(pool))] + pub(crate) async fn get_locations( + pool: &PgPool, + ids: &[String], + ) -> anyhow::Result> { + let res = sqlx::query_as!( + CalendarLocation, + "SELECT key,name,last_calendar_scrape_at,calendar_url,type,type_common_name FROM de WHERE key = ANY($1::text[])", + ids + ) + .fetch_all(pool) + .await?; + Ok(LimitedVec(res)) + } +} impl Debug for CalendarLocation { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { let mut base = f.debug_struct("CalendarLocation"); @@ -58,70 +45,56 @@ impl Debug for CalendarLocation { } } -#[derive(Serialize, Deserialize, Clone, utoipa::ToSchema)] pub struct LocationEvents { pub events: LimitedVec, pub location: CalendarLocation, } +impl LocationEvents { + #[tracing::instrument(skip(pool))] + pub(crate) async fn get_from_db( + pool: &PgPool, + locations: Vec, + start_after: &DateTime, + end_before: &DateTime, + ) -> anyhow::Result> { + let mut located_events: HashMap = HashMap::new(); + for location in locations.into_iter() { + let events = sqlx::query_as!( + Event, + r#"SELECT id,room_code,start_at,end_at,title_de,title_en,stp_type,entry_type,detailed_entry_type + FROM calendar + WHERE room_code = $1 AND start_at >= $2 AND end_at <= $3"#, + location.key, + start_after, + end_before + ) + .fetch_all(pool) + .await?; + located_events.insert( + location.key.clone(), + LocationEvents { + location, + events: events.into(), + }, + ); + } + Ok(LimitedHashMap(located_events)) + } +} -#[derive(Serialize, Deserialize, Clone, utoipa::ToSchema)] pub struct Event { - /// ID of the calendar entry used in TUMonline internally - #[schema(examples(6424))] pub id: i32, - /// Structured, globaly unique room code - /// - /// Included to enable multi-room calendars. - /// Format: BUILDING.LEVEL.NUMBER - #[schema(examples("5602.EG.001", "5121.EG.003"))] pub room_code: String, - /// start of the entry - #[schema(examples("2018-01-01T00:00:00"))] pub start_at: DateTime, - /// end of the entry - #[schema(examples("2019-01-01T00:00:00"))] pub end_at: DateTime, - /// German title of the Entry - #[schema(examples("Quantenteleportation"))] pub title_de: String, - /// English title of the Entry - #[schema(examples("Quantum teleportation"))] pub title_en: String, - /// Lecture-type - #[schema(examples("Vorlesung mit Zentralübung"))] pub stp_type: Option, - /// What this calendar entry means. - /// - /// Each of these should be displayed in a different color - /// TODO document as an enum with these values via EventType: - /// - `lecture` - /// - `exercise` - /// - `exam` - /// - `barred` - /// - `other` - #[schema(examples("lecture", "exercise", "exam"))] pub entry_type: String, - /// For some Entrys, we do have more information (what kind of a `lecture` is it? What kind of an other `entry` is it?) - #[schema(examples("Abhaltung"))] pub detailed_entry_type: String, } -impl Debug for Event { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - let duration = (self.end_at - self.start_at).num_minutes(); - f.debug_tuple("Event") - .field(&format!( - "{start} ({duration_h}h{duration_min:?}m): {title}", - start = self.start_at.naive_local(), - duration_min = duration % 60, - duration_h = duration / 60, - title = self.title_de - )) - .finish() - } -} - impl Event { - #[tracing::instrument] + #[tracing::instrument(skip(pool))] pub async fn store_all( pool: &PgPool, events: LimitedVec, @@ -129,7 +102,7 @@ impl Event { ) -> anyhow::Result<()> { // insert into db let mut tx = pool.begin().await?; - if let Err(e) = Event::delete_events(&mut tx, id).await { + if let Err(e) = Event::delete(&mut tx, id).await { error!("could not delete existing events because {e:?}"); tx.rollback().await?; return Err(e.into()); @@ -155,7 +128,7 @@ impl Event { Ok(()) } #[tracing::instrument(skip(tx))] - async fn delete_events( + async fn delete( tx: &mut sqlx::Transaction<'_, sqlx::Postgres>, id: &str, ) -> Result<(), sqlx::Error> { @@ -202,6 +175,7 @@ impl Event { .await } + #[tracing::instrument(skip(tx))] pub async fn store( &self, tx: &mut sqlx::Transaction<'_, sqlx::Postgres>, @@ -231,10 +205,39 @@ impl Event { } } -#[derive(Serialize, Deserialize, Clone, Debug, sqlx::Type, utoipa::ToSchema)] +impl Debug for Event { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + let duration = (self.end_at - self.start_at).num_minutes(); + f.debug_tuple("Event") + .field(&format!( + "{start} ({duration_h}h{duration_min:?}m): {title}", + start = self.start_at.naive_local(), + duration_min = duration % 60, + duration_h = duration / 60, + title = self.title_de + )) + .finish() + } +} +impl From for Event { + fn from(value: ConnectumEvent) -> Self { + Event { + id: value.id, + room_code: value.room_code, + start_at: value.start_at, + end_at: value.end_at, + title_de: value.title_de, + title_en: value.title_en, + stp_type: value.stp_type, + entry_type: value.entry_type, + detailed_entry_type: value.detailed_entry_type, + } + } +} + +#[derive(Clone, Debug, sqlx::Type)] #[sqlx(type_name = "EventType")] #[sqlx(rename_all = "lowercase")] -#[serde(rename_all = "lowercase")] pub enum EventType { Lecture, Exercise, @@ -244,10 +247,13 @@ pub enum EventType { } impl Display for EventType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let mut str = serde_json::to_string(self).map_err(|_| std::fmt::Error)?; - let _ = str.remove(0); - let _ = str.remove(str.len() - 1); - write!(f, "{str}") + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + match self { + EventType::Lecture => write!(f, "lecture"), + EventType::Exercise => write!(f, "exercise"), + EventType::Exam => write!(f, "exam"), + EventType::Barred => write!(f, "barred"), + EventType::Other => write!(f, "other"), + } } } diff --git a/server/src/db/mod.rs b/server/src/db/mod.rs new file mode 100644 index 000000000..e1087a7fb --- /dev/null +++ b/server/src/db/mod.rs @@ -0,0 +1 @@ +pub mod calendar; diff --git a/server/src/external/connectum.rs b/server/src/external/connectum.rs index 8f50f5a57..474d73fbf 100644 --- a/server/src/external/connectum.rs +++ b/server/src/external/connectum.rs @@ -1,10 +1,11 @@ const KEEP_ALIVE: Duration = Duration::from_secs(30); -use crate::calendar::models::Event; +use chrono::{DateTime, Utc}; use oauth2::basic::{BasicClient, BasicTokenResponse}; use oauth2::reqwest::async_http_client; use oauth2::url::Url; use oauth2::{AuthUrl, ClientId, ClientSecret, Scope, TokenResponse, TokenUrl}; -use std::fmt; +use serde::Deserialize; +use std::fmt::{Debug, Formatter}; use std::sync::Arc; use std::sync::RwLock; use std::time::{Duration, Instant}; @@ -16,8 +17,8 @@ pub struct APIRequestor { client: reqwest::Client, oauth_token: OauthAccessToken, } -impl fmt::Debug for APIRequestor { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +impl Debug for APIRequestor { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { let mut base = f.debug_struct("APIRequestor"); if !self.oauth_token.should_refresh_token() { base.field("token", &self.oauth_token); @@ -41,7 +42,7 @@ impl Default for APIRequestor { } } impl APIRequestor { - pub async fn list_events(&mut self, id: &str) -> anyhow::Result> { + pub async fn list_events(&mut self, id: &str) -> anyhow::Result> { let token = self.oauth_token.get_possibly_refreshed_token().await; let url = format!("https://campus.tum.de/tumonline/co/connectum/api/rooms/{id}/calendars"); @@ -52,12 +53,24 @@ impl APIRequestor { .bearer_auth(token) .send() .await? - .json::>() + .json::>() .await?; Ok(events) } } +#[derive(Deserialize)] +pub struct ConnectumEvent { + pub id: i32, + pub room_code: String, + pub start_at: DateTime, + pub end_at: DateTime, + pub title_de: String, + pub title_en: String, + pub stp_type: Option, + pub entry_type: String, + pub detailed_entry_type: String, +} #[derive(Clone)] struct OauthAccessToken(Arc>>); @@ -139,8 +152,8 @@ impl OauthAccessToken { token.unwrap() } } -impl fmt::Debug for OauthAccessToken { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +impl Debug for OauthAccessToken { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { let token = self.0.read().expect("not poisoned"); let start_elapsed = token.as_ref().map(|(start, _)| start.elapsed()); let mut base = f.debug_struct("Token"); diff --git a/server/src/external/download_map_image.rs b/server/src/external/download_map_image.rs index 809bcfaf9..7cd1a4184 100644 --- a/server/src/external/download_map_image.rs +++ b/server/src/external/download_map_image.rs @@ -1,11 +1,11 @@ -use std::fmt::Display; +use std::fmt::{Display, Formatter}; +use std::io; use std::time::Duration; -use std::{fmt, io}; use tracing::{error, warn}; use crate::limited::vec::LimitedVec; -use crate::maps::overlay_map::OverlayMapTask; +use crate::overlays::map::OverlayMapTask; #[derive(Hash, Debug, Copy, Clone)] struct TileLocation { @@ -15,7 +15,7 @@ struct TileLocation { } impl Display for TileLocation { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.debug_tuple("TileLocation") .field(&self.x) .field(&self.y) diff --git a/server/src/external/meilisearch.rs b/server/src/external/meilisearch.rs index bbc741f2b..dab3f46f3 100644 --- a/server/src/external/meilisearch.rs +++ b/server/src/external/meilisearch.rs @@ -5,7 +5,7 @@ use meilisearch_sdk::search::{MultiSearchResponse, SearchQuery, Selectors}; use serde::Deserialize; use std::fmt::{Debug, Formatter}; -use crate::search::{Highlighting, Limits}; +use crate::routes::search::{Highlighting, Limits}; #[derive(Deserialize, Default, Clone)] #[allow(dead_code)] diff --git a/server/src/external/mod.rs b/server/src/external/mod.rs index f5cf07029..41374b302 100644 --- a/server/src/external/mod.rs +++ b/server/src/external/mod.rs @@ -2,3 +2,4 @@ pub mod connectum; pub mod download_map_image; pub mod github; pub mod meilisearch; +pub mod nominatim; diff --git a/server/src/external/nominatim.rs b/server/src/external/nominatim.rs new file mode 100644 index 000000000..1fefab8e0 --- /dev/null +++ b/server/src/external/nominatim.rs @@ -0,0 +1,100 @@ +use crate::limited::vec::LimitedVec; +use serde::Deserialize; + +#[derive(Deserialize, Clone)] +pub struct NominatimAddressResponse { + // postcode: Option, + // country: Option, + // country_code: Option, + // ISO3166-2-lvl4: Option, + state: Option, + county: Option, + town: Option, + suburb: Option, + village: Option, + hamlet: Option, + pub road: Option, +} + +impl NominatimAddressResponse { + pub fn serialise(&self) -> String { + let mut result = Vec::::new(); + if let Some(state) = self.state.clone() { + result.push(state); + } + if let Some(county) = self.county.clone() { + result.push(county); + } + if let Some(town) = self.town.clone() { + result.push(town); + } + if let Some(suburb) = self.suburb.clone() { + result.push(suburb); + } + if let Some(village) = self.village.clone() { + result.push(village); + } + if let Some(hamlet) = self.hamlet.clone() { + result.push(hamlet); + } + if let Some(road) = self.road.clone() { + result.push(road); + } + result.join(", ") + } +} + +#[derive(Deserialize, Clone)] +pub struct Nominatim { + /// Example: 371651568 + pub osm_id: i64, + /// Example: "road", + #[serde(rename = "addresstype")] + pub address_type: String, + /// Example: "Münchner Straße", + pub name: String, + pub address: NominatimAddressResponse, +} +impl Nominatim { + #[tracing::instrument] + pub async fn address_search(q: &str) -> anyhow::Result> { + let url = std::env::var("NOMINATIM_URL") + .unwrap_or_else(|_| "https://nav.tum.de/nominatim".to_string()); + let url = format!("{url}/search?q={q}&addressdetails=1"); + let Ok(nominatim_results) = reqwest::get(&url).await else { + anyhow::bail!("cannot get {url}"); + }; + let Ok(results) = nominatim_results.json::>().await else { + anyhow::bail!("the results from nomnatim is not what we expected {url}"); + }; + Ok(LimitedVec(results)) + } +} + +#[cfg(test)] +mod test { + use super::*; + #[test] + fn serialize_address() { + let response = NominatimAddressResponse { + state: None, + county: None, + town: None, + suburb: None, + village: None, + hamlet: None, + road: None, + }; + insta::assert_snapshot!(response.serialise(), @""); + let response = NominatimAddressResponse { + state: Some("Bavaria".to_string()), + county: Some("Germany".to_string()), + town: Some("Berlin".to_string()), + suburb: Some("Neuköln".to_string()), + village: None, + hamlet: None, + road: Some("Münchnerstraße 21".to_string()), + }; + insta::assert_snapshot!(response.serialise(), @"Bavaria, Germany, Berlin, Neuköln, Münchnerstraße 21"); + } +} diff --git a/server/src/main.rs b/server/src/main.rs index 3b46da07b..bde438c48 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -16,18 +16,18 @@ use tokio::sync::{Barrier, RwLock}; use tracing::{debug_span, error, info}; use tracing_actix_web::TracingLogger; -mod calendar; mod docs; -mod feedback; mod limited; mod localisation; -mod locations; -mod maps; -mod models; -mod search; +mod search_executor; mod setup; use utoipa_actix_web::{scope, AppExt}; +mod db; pub mod external; +pub mod overlays; +pub mod refresh; +pub mod routes; +use routes::*; const MAX_JSON_PAYLOAD: usize = 1024 * 1024; // 1 MB @@ -185,9 +185,9 @@ async fn run_maintenance_work( } let mut set = tokio::task::JoinSet::new(); let map_pool = pool.clone(); - set.spawn(async move { maps::refresh::all_entries(&map_pool).await }); + set.spawn(async move { refresh::indoor_maps::all_entries(&map_pool).await }); let cal_pool = pool.clone(); - set.spawn(async move { calendar::refresh::all_entries(&cal_pool).await }); + set.spawn(async move { refresh::calendar::all_entries(&cal_pool).await }); set.join_all().await; } @@ -213,7 +213,7 @@ async fn run() -> anyhow::Result<()> { .burst_size(50) .finish() .expect("Invalid configuration of the governor"); - let recorded_tokens = web::Data::new(crate::feedback::tokens::RecordedTokens::default()); + let recorded_tokens = web::Data::new(feedback::tokens::RecordedTokens::default()); info!("running the server"); HttpServer::new(move || { @@ -238,8 +238,8 @@ async fn run() -> anyhow::Result<()> { .app_data(recorded_tokens.clone()) .service(health_status_handler) .service(calendar::calendar_handler) - .service(maps::indoor::list_indoor_maps) - .service(maps::indoor::get_indoor_map) + .service(routes::indoor::list_indoor_maps) + .service(routes::indoor::get_indoor_map) .service(search::search_handler) .service(locations::details::get_handler) .service(locations::nearby::nearby_handler) diff --git a/server/src/maps/mod.rs b/server/src/maps/mod.rs deleted file mode 100644 index c6590d48b..000000000 --- a/server/src/maps/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub(crate) mod indoor; -pub(crate) mod overlay_map; -pub(crate) mod overlay_text; -pub(crate) mod refresh; diff --git a/server/src/models.rs b/server/src/models.rs deleted file mode 100644 index 6327a06ff..000000000 --- a/server/src/models.rs +++ /dev/null @@ -1,7 +0,0 @@ -#[derive(Debug, Clone)] -#[allow(dead_code)] // false positive. Clippy can't detect this due to macros -pub struct LocationKeyAlias { - pub key: String, - pub visible_id: String, - pub r#type: String, -} diff --git a/server/src/maps/font/Cantarell-Bold.ttf b/server/src/overlays/font/Cantarell-Bold.ttf similarity index 100% rename from server/src/maps/font/Cantarell-Bold.ttf rename to server/src/overlays/font/Cantarell-Bold.ttf diff --git a/server/src/maps/font/Cantarell-BoldOblique.ttf b/server/src/overlays/font/Cantarell-BoldOblique.ttf similarity index 100% rename from server/src/maps/font/Cantarell-BoldOblique.ttf rename to server/src/overlays/font/Cantarell-BoldOblique.ttf diff --git a/server/src/maps/font/Cantarell-Oblique.ttf b/server/src/overlays/font/Cantarell-Oblique.ttf similarity index 100% rename from server/src/maps/font/Cantarell-Oblique.ttf rename to server/src/overlays/font/Cantarell-Oblique.ttf diff --git a/server/src/maps/font/Cantarell-Regular.ttf b/server/src/overlays/font/Cantarell-Regular.ttf similarity index 100% rename from server/src/maps/font/Cantarell-Regular.ttf rename to server/src/overlays/font/Cantarell-Regular.ttf diff --git a/server/src/maps/font/SIL Open Font License.txt b/server/src/overlays/font/SIL Open Font License.txt similarity index 100% rename from server/src/maps/font/SIL Open Font License.txt rename to server/src/overlays/font/SIL Open Font License.txt diff --git a/server/src/maps/overlay_map.rs b/server/src/overlays/map.rs similarity index 100% rename from server/src/maps/overlay_map.rs rename to server/src/overlays/map.rs diff --git a/server/src/overlays/mod.rs b/server/src/overlays/mod.rs new file mode 100644 index 000000000..f0d2ad013 --- /dev/null +++ b/server/src/overlays/mod.rs @@ -0,0 +1,2 @@ +pub mod map; +pub mod text; diff --git a/server/src/maps/overlay_text.rs b/server/src/overlays/text.rs similarity index 100% rename from server/src/maps/overlay_text.rs rename to server/src/overlays/text.rs diff --git a/server/src/calendar/refresh.rs b/server/src/refresh/calendar.rs similarity index 98% rename from server/src/calendar/refresh.rs rename to server/src/refresh/calendar.rs index 4c9696109..28518aacd 100644 --- a/server/src/calendar/refresh.rs +++ b/server/src/refresh/calendar.rs @@ -1,4 +1,4 @@ -use crate::calendar::models::Event; +use crate::db::calendar::Event; use crate::external::connectum::APIRequestor; use crate::limited::vec::LimitedVec; use futures::stream::FuturesUnordered; @@ -145,7 +145,8 @@ async fn refresh_single(pool: &PgPool, mut api: APIRequestor, id: String) -> any e.room_code.clone_from(&id); e }) - .collect::>(); + .map(Event::from) + .collect::>(); Event::store_all(pool, events, &id).await?; Ok(()) } diff --git a/server/src/maps/refresh.rs b/server/src/refresh/indoor_maps.rs similarity index 100% rename from server/src/maps/refresh.rs rename to server/src/refresh/indoor_maps.rs diff --git a/server/src/refresh/mod.rs b/server/src/refresh/mod.rs new file mode 100644 index 000000000..02238c57a --- /dev/null +++ b/server/src/refresh/mod.rs @@ -0,0 +1,2 @@ +pub mod calendar; +pub mod indoor_maps; diff --git a/server/src/calendar/mod.rs b/server/src/routes/calendar.rs similarity index 76% rename from server/src/calendar/mod.rs rename to server/src/routes/calendar.rs index 4cd60e2a2..370d1ee22 100644 --- a/server/src/calendar/mod.rs +++ b/server/src/routes/calendar.rs @@ -1,23 +1,18 @@ -use std::collections::HashMap; - use actix_web::{post, web, HttpResponse}; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; -use sqlx::PgPool; +use std::collections::HashMap; use tracing::error; -use crate::calendar::models::{CalendarLocation, Event, LocationEvents}; -use crate::limited::hash_map::LimitedHashMap; -use crate::limited::vec::LimitedVec; +use crate::db::calendar::{CalendarLocation, Event, LocationEvents}; use actix_web::http::header::{CacheControl, CacheDirective}; -pub mod models; -pub mod refresh; #[expect( unused_imports, reason = "has to be imported as otherwise utoipa generates incorrect code" )] use serde_json::json; + #[derive(Serialize, Deserialize, Clone, Debug, utoipa::IntoParams, utoipa::ToSchema)] pub struct Arguments { /// ids you want the calendars for @@ -65,8 +60,8 @@ impl Arguments { #[utoipa::path( tags=["calendar"], responses( - (status = 200, description = "**Entries of the calendar** in the requested time span", body = HashMap, content_type = "application/json"), - (status = 400, description= "**Bad Request.** Not all fields in the body are present as defined above", body = String, example = "Too many ids to query. We suspect that users don't need this. If you need this limit increased, please send us a message"), + (status = 200, description = "**Entries of the calendar** in the requested time span", body = HashMap, content_type = "application/json"), + (status = 400, description= "**Bad Request.** Not all fields in the body are present as defined above", body = String, example = "Too many ids to query. We suspect that users don't need this. If you need this limit increased, please send us a message"), (status = 404, description = "**Not found.** The requested location does not have a calendar", body = String, content_type = "text/plain", example = "Not found"), (status = 503, description = "**Not Ready.** please retry later", body = String, content_type = "text/plain", example = "Waiting for first sync with TUMonline"), ) @@ -80,29 +75,59 @@ pub async fn calendar_handler( Ok(ids) => ids, Err(e) => return e, }; - let locations = match get_locations(&data.pool, &ids).await { + let locations = match CalendarLocation::get_locations(&data.pool, &ids).await { Ok(l) => l.0, - Err(e) => return e, + Err(e) => { + error!("could not refetch due to {e:?}"); + return HttpResponse::InternalServerError() + .content_type("text/plain") + .body("could not get calendar entries, please try again later"); + } }; if let Err(e) = validate_locations(&ids, &locations) { return e; } - match get_from_db(&data.pool, &locations, &args.start_after, &args.end_before).await { - Ok(events) => HttpResponse::Ok() - .insert_header(CacheControl(vec![ - CacheDirective::MaxAge(60 * 60), // valid for 1h - CacheDirective::Public, - ])) - .json(events), + let events = match LocationEvents::get_from_db( + &data.pool, + locations, + &args.start_after, + &args.end_before, + ) + .await + { + Ok(events) => events.0, Err(e) => { error!("could not get entries from the db for {ids:?} because {e:?}"); - HttpResponse::InternalServerError() + return HttpResponse::InternalServerError() .content_type("text/plain") - .body("could not get calendar entries, please try again later") + .body("could not get calendar entries, please try again later"); } - } + }; + let events = events + .into_iter() + .map(|(id, events)| (id, ResponseLocationEvents::from(events))) + .collect::>(); + HttpResponse::Ok() + .insert_header(CacheControl(vec![ + CacheDirective::MaxAge(60 * 60), // valid for 1h + CacheDirective::Public, + ])) + .json(events) } +#[derive(Serialize, utoipa::ToSchema)] +struct ResponseLocationEvents { + events: Vec, + location: ResponseCalendarLocation, +} +impl From for ResponseLocationEvents { + fn from(value: LocationEvents) -> Self { + ResponseLocationEvents { + events: value.events.into_iter().map(ResponseEvent::from).collect(), + location: ResponseCalendarLocation::from(value.location), + } + } +} fn validate_locations(ids: &[String], locations: &[CalendarLocation]) -> Result<(), HttpResponse> { for id in ids { if !locations.iter().any(|l| &l.key == id) { @@ -132,61 +157,128 @@ fn validate_locations(ids: &[String], locations: &[CalendarLocation]) -> Result< } Ok(()) } - -#[tracing::instrument(skip(pool))] -async fn get_locations( - pool: &PgPool, - ids: &[String], -) -> Result, HttpResponse> { - match sqlx::query_as!( - CalendarLocation, - "SELECT key,name,last_calendar_scrape_at,calendar_url,type,type_common_name FROM de WHERE key = ANY($1::text[])", - ids - ) - .fetch_all(pool) - .await - { - Err(e) => { - error!("could not refetch due to {e:?}"); - Err(HttpResponse::InternalServerError() - .content_type("text/plain") - .body("could not get calendar entries, please try again later")) +#[derive(Serialize, utoipa::ToSchema)] +pub struct ResponseCalendarLocation { + /// Structured, globaly unique room code + /// + /// Included to enable multi-room calendars. + /// Format: BUILDING.LEVEL.NUMBER + #[schema(examples("5602.EG.001", "5121.EG.003"))] + key: String, + /// name of the entry in a human-readable form + #[schema(examples( + "5602.EG.001 (MI HS 1, Friedrich L. Bauer Hörsaal)", + "5121.EG.003 (Computerraum)" + ))] + name: String, + /// last time the calendar was scraped for this room + #[schema(examples("2039-01-19T03:14:07+01:00", "2042-01-07T00:00:00 UTC"))] + last_calendar_scrape_at: Option>, + /// Link to the calendar of the room + #[schema(examples( + "https://campus.tum.de/tumonline/tvKalender.wSicht?cOrg=19691&cRes=12543&cReadonly=J", + "https://campus.tum.de/tumonline/tvKalender.wSicht?cOrg=19691&cRes=12559&cReadonly=J" + ))] + calendar_url: Option, + /// Type of the entry in a human-readable form + #[schema(examples("Serverraum", "Büro"))] + type_common_name: String, + /// type of the entry + /// + /// TODO document as a n enum with the following choices: + /// - `room` + /// - `building` + /// - `joined_building` + /// - `area` + /// - `site` + /// - `campus` + /// - `poi` + #[schema(examples("room", "building", "joined_building", "area", "site", "campus", "poi"))] + r#type: String, +} +impl From for ResponseCalendarLocation { + fn from(value: CalendarLocation) -> Self { + ResponseCalendarLocation { + key: value.key, + name: value.name, + last_calendar_scrape_at: value.last_calendar_scrape_at, + calendar_url: value.calendar_url, + type_common_name: value.type_common_name, + r#type: value.r#type, } - Ok(locations) => Ok(LimitedVec(locations)), } } -#[tracing::instrument(skip(pool))] -async fn get_from_db( - pool: &PgPool, - locations: &[CalendarLocation], - start_after: &DateTime, - end_before: &DateTime, -) -> anyhow::Result> { - let mut located_events: HashMap = HashMap::new(); - for location in locations { - let events = sqlx::query_as!( - Event, - r#"SELECT id,room_code,start_at,end_at,title_de,title_en,stp_type,entry_type,detailed_entry_type - FROM calendar - WHERE room_code = $1 AND start_at >= $2 AND end_at <= $3"#, - location.key, - start_after, - end_before - ) - .fetch_all(pool) - .await?; - located_events.insert( - location.key.clone(), - LocationEvents { - location: location.clone(), - events: events.into(), - }, - ); +#[derive(Serialize, Deserialize, utoipa::ToSchema)] +struct ResponseEvent { + /// ID of the calendar entry used in TUMonline internally + #[schema(examples(6424))] + id: i32, + /// Structured, globaly unique room code + /// + /// Included to enable multi-room calendars. + /// Format: BUILDING.LEVEL.NUMBER + #[schema(examples("5602.EG.001", "5121.EG.003"))] + room_code: String, + /// start of the entry + #[schema(examples("2018-01-01T00:00:00"))] + start_at: DateTime, + /// end of the entry + #[schema(examples("2019-01-01T00:00:00"))] + end_at: DateTime, + /// German title of the Entry + #[schema(examples("Quantenteleportation"))] + title_de: String, + /// English title of the Entry + #[schema(examples("Quantum teleportation"))] + title_en: String, + /// Lecture-type + #[schema(examples("Vorlesung mit Zentralübung"))] + stp_type: Option, + /// What this calendar entry means. + /// + /// Each of these should be displayed in a different color + entry_type: ResponseEventType, + /// For some Entrys, we do have more information (what kind of a `lecture` is it? What kind of an other `entry` is it?) + #[schema(examples("Abhaltung"))] + detailed_entry_type: String, +} +impl From for ResponseEvent { + fn from(value: Event) -> Self { + ResponseEvent { + id: value.id, + room_code: value.room_code, + start_at: value.start_at, + end_at: value.end_at, + title_de: value.title_de, + title_en: value.title_en, + stp_type: value.stp_type, + entry_type: ResponseEventType::from(value.entry_type), + detailed_entry_type: value.detailed_entry_type, + } } - Ok(LimitedHashMap(located_events)) } +#[derive(Serialize, Deserialize, Debug, utoipa::ToSchema)] +#[serde(rename_all = "lowercase")] +pub enum ResponseEventType { + Lecture, + Exercise, + Exam, + Barred, + Other, +} +impl From for ResponseEventType { + fn from(value: String) -> Self { + match value.as_str() { + "lecture" => ResponseEventType::Lecture, + "exercise" => ResponseEventType::Exercise, + "exam" => ResponseEventType::Exam, + "barred" => ResponseEventType::Barred, + _ => ResponseEventType::Other, + } + } +} #[cfg(test)] mod db_tests { use std::sync::Arc; @@ -198,11 +290,11 @@ mod db_tests { use pretty_assertions::assert_eq; use serde_json::Value; + use super::*; + use crate::db::calendar::EventType; use crate::setup::tests::PostgresTestContainer; use crate::AppData; - use super::*; - /// Workaround because [`Option::unwrap()`] is not (yet) available in const context. /// See https://github.com/rust-lang/rust/issues/67441 for further context const fn unwrap(opt: Option) -> T { @@ -249,7 +341,7 @@ mod db_tests { title_de: "Quantenteleportation".into(), title_en: "Quantum teleportation".into(), stp_type: Some("Vorlesung mit Zentralübung".into()), - entry_type: models::EventType::Lecture.to_string(), + entry_type: EventType::Lecture.to_string(), detailed_entry_type: "Abhaltung".into(), }, Event { @@ -260,7 +352,7 @@ mod db_tests { title_de: "Quantenteleportation 2".into(), title_en: "Quantum teleportation 2".into(), stp_type: Some("Vorlesung mit Zentralübung".into()), - entry_type: models::EventType::Lecture.to_string(), + entry_type: EventType::Lecture.to_string(), detailed_entry_type: "Abhaltung".into(), }, Event { @@ -271,7 +363,7 @@ mod db_tests { title_de: "Wartung".into(), title_en: "maintenance".into(), stp_type: Some("Vorlesung mit Zentralübung".into()), - entry_type: models::EventType::Barred.to_string(), + entry_type: EventType::Barred.to_string(), detailed_entry_type: "Abhaltung".into(), }, Event { @@ -282,7 +374,7 @@ mod db_tests { title_de: "Quantenteleportation 3".into(), title_en: "Quantum teleportation 3".into(), stp_type: Some("Vorlesung".into()), - entry_type: models::EventType::Other.to_string(), + entry_type: EventType::Other.to_string(), detailed_entry_type: "Abhaltung".into(), }, Event { @@ -293,14 +385,14 @@ mod db_tests { title_de: "Quantenteleportation 3".into(), title_en: "Quantum teleportation 3".into(), stp_type: Some("Vorlesung".into()), - entry_type: models::EventType::Exam.to_string(), + entry_type: EventType::Exam.to_string(), detailed_entry_type: "Abhaltung".into(), }, ], ) } - async fn load_sample_data(pool: &PgPool, now_rfc3339: &str) { + async fn load_sample_data(pool: &sqlx::PgPool, now_rfc3339: &str) { let mut tx = pool.begin().await.unwrap(); let (locations, events) = sample_data(); for (key, data) in locations { diff --git a/server/src/feedback/mod.rs b/server/src/routes/feedback/mod.rs similarity index 100% rename from server/src/feedback/mod.rs rename to server/src/routes/feedback/mod.rs diff --git a/server/src/feedback/post_feedback.rs b/server/src/routes/feedback/post_feedback.rs similarity index 100% rename from server/src/feedback/post_feedback.rs rename to server/src/routes/feedback/post_feedback.rs diff --git a/server/src/feedback/proposed_edits/coordinate.rs b/server/src/routes/feedback/proposed_edits/coordinate.rs similarity index 100% rename from server/src/feedback/proposed_edits/coordinate.rs rename to server/src/routes/feedback/proposed_edits/coordinate.rs diff --git a/server/src/feedback/proposed_edits/discription.rs b/server/src/routes/feedback/proposed_edits/discription.rs similarity index 100% rename from server/src/feedback/proposed_edits/discription.rs rename to server/src/routes/feedback/proposed_edits/discription.rs diff --git a/server/src/feedback/proposed_edits/image.rs b/server/src/routes/feedback/proposed_edits/image.rs similarity index 100% rename from server/src/feedback/proposed_edits/image.rs rename to server/src/routes/feedback/proposed_edits/image.rs diff --git a/server/src/feedback/proposed_edits/mod.rs b/server/src/routes/feedback/proposed_edits/mod.rs similarity index 100% rename from server/src/feedback/proposed_edits/mod.rs rename to server/src/routes/feedback/proposed_edits/mod.rs diff --git a/server/src/feedback/proposed_edits/tmp_repo.rs b/server/src/routes/feedback/proposed_edits/tmp_repo.rs similarity index 100% rename from server/src/feedback/proposed_edits/tmp_repo.rs rename to server/src/routes/feedback/proposed_edits/tmp_repo.rs diff --git a/server/src/feedback/tokens.rs b/server/src/routes/feedback/tokens.rs similarity index 98% rename from server/src/feedback/tokens.rs rename to server/src/routes/feedback/tokens.rs index 61326b5fd..1fad3a609 100644 --- a/server/src/feedback/tokens.rs +++ b/server/src/routes/feedback/tokens.rs @@ -39,8 +39,8 @@ pub struct Claims { kid: u64, // Optional. Key ID } -impl Claims { - pub fn new() -> Self { +impl Default for Claims { + fn default() -> Self { let now = chrono::Utc::now().timestamp(); Self { exp: now + TOKEN_MAX_AGE, @@ -155,7 +155,7 @@ pub async fn get_token() -> HttpResponse { let secret = std::env::var("JWT_KEY").unwrap(); // we checked the ability to process feedback let token = encode( &Header::default(), - &Claims::new(), + &Claims::default(), &EncodingKey::from_secret(secret.as_bytes()), ); diff --git a/server/src/maps/indoor.rs b/server/src/routes/indoor.rs similarity index 100% rename from server/src/maps/indoor.rs rename to server/src/routes/indoor.rs diff --git a/server/src/locations/details.rs b/server/src/routes/locations/details.rs similarity index 99% rename from server/src/locations/details.rs rename to server/src/routes/locations/details.rs index 36d320682..a7ca5cfc1 100644 --- a/server/src/locations/details.rs +++ b/server/src/routes/locations/details.rs @@ -6,13 +6,21 @@ use sqlx::PgPool; use tracing::error; use crate::localisation; -use crate::models::LocationKeyAlias; + #[expect( unused_imports, reason = "has to be imported as otherwise utoipa generates incorrect code" )] use serde_json::json; +#[derive(Debug, Clone)] +#[allow(dead_code)] // false positive. Clippy can't detect this due to macros +pub struct LocationKeyAlias { + pub key: String, + pub visible_id: String, + pub r#type: String, +} + #[derive(Deserialize, utoipa::IntoParams)] struct DetailsPathParams { /// ID of the location diff --git a/server/src/locations/mod.rs b/server/src/routes/locations/mod.rs similarity index 100% rename from server/src/locations/mod.rs rename to server/src/routes/locations/mod.rs diff --git a/server/src/locations/nearby.rs b/server/src/routes/locations/nearby.rs similarity index 100% rename from server/src/locations/nearby.rs rename to server/src/routes/locations/nearby.rs diff --git a/server/src/locations/preview.rs b/server/src/routes/locations/preview.rs similarity index 95% rename from server/src/locations/preview.rs rename to server/src/routes/locations/preview.rs index 9cc40bf38..1c2ae90bd 100644 --- a/server/src/locations/preview.rs +++ b/server/src/routes/locations/preview.rs @@ -11,9 +11,16 @@ use unicode_truncate::UnicodeTruncateStr; use crate::limited::vec::LimitedVec; use crate::localisation; -use crate::maps::overlay_map::OverlayMapTask; -use crate::maps::overlay_text::{cantarell_bold, cantarell_regular, OverlayText}; -use crate::models::LocationKeyAlias; +use crate::overlays::map::OverlayMapTask; +use crate::overlays::text::{cantarell_bold, cantarell_regular, OverlayText}; + +#[derive(Debug, Clone)] +#[allow(dead_code)] // false positive. Clippy can't detect this due to macros +pub struct LocationKeyAlias { + pub key: String, + pub visible_id: String, + pub r#type: String, +} #[derive(Debug)] struct Location { diff --git a/server/src/locations/static/logo-card.png b/server/src/routes/locations/static/logo-card.png similarity index 100% rename from server/src/locations/static/logo-card.png rename to server/src/routes/locations/static/logo-card.png diff --git a/server/src/locations/static/logo.png b/server/src/routes/locations/static/logo.png similarity index 100% rename from server/src/locations/static/logo.png rename to server/src/routes/locations/static/logo.png diff --git a/server/src/locations/static/pin.png b/server/src/routes/locations/static/pin.png similarity index 100% rename from server/src/locations/static/pin.png rename to server/src/routes/locations/static/pin.png diff --git a/server/src/locations/static/pin.svg b/server/src/routes/locations/static/pin.svg similarity index 100% rename from server/src/locations/static/pin.svg rename to server/src/routes/locations/static/pin.svg diff --git a/server/src/routes/mod.rs b/server/src/routes/mod.rs new file mode 100644 index 000000000..c632b9d81 --- /dev/null +++ b/server/src/routes/mod.rs @@ -0,0 +1,5 @@ +pub mod calendar; +pub mod feedback; +pub mod indoor; +pub mod locations; +pub mod search; diff --git a/server/src/search/mod.rs b/server/src/routes/search.rs similarity index 97% rename from server/src/search/mod.rs rename to server/src/routes/search.rs index f7298e591..e2e4de6b3 100644 --- a/server/src/search/mod.rs +++ b/server/src/routes/search.rs @@ -1,7 +1,7 @@ use std::fmt::{Debug, Formatter}; use std::time::Instant; -use crate::search::search_executor::ResultFacet; +use crate::search_executor::{ResultFacet, ResultsSection}; use crate::AppData; use actix_web::http::header::{CacheControl, CacheDirective}; use actix_web::{get, web, HttpResponse}; @@ -12,8 +12,6 @@ use tokio::join; use tracing::{debug, error}; use unicode_truncate::UnicodeTruncateStr; -mod search_executor; - #[derive(Deserialize, Debug, Default, utoipa::IntoParams, utoipa::ToSchema)] pub struct SearchQueryArgs { /// string you want to search for. @@ -95,7 +93,7 @@ pub struct SearchQueryArgs { /// Returned search results by this #[derive(Serialize, utoipa::ToSchema)] pub struct SearchResults { - sections: Vec, + sections: Vec, /// Time the search took in the server side, not including network delay /// /// Maximum as timeout. @@ -276,19 +274,20 @@ async fn cached_geoentry_search( highlighting: Highlighting, limits: Limits, search_addresses: bool, -) -> Vec { +) -> Vec { 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"); return if search_addresses { - search_executor::address_search(&q).await.0 + crate::search_executor::address_search(&q).await.0 } else { vec![] }; }; - let geoentry_search = search_executor::do_geoentry_search(&client, &q, highlighting, limits); + let geoentry_search = + crate::search_executor::do_geoentry_search(&client, &q, highlighting, limits); if search_addresses { - let address_search = search_executor::address_search(&q); + let address_search = crate::search_executor::address_search(&q); let (address_search, mut geoentry_search) = join!(address_search, geoentry_search); geoentry_search.0.extend(address_search.0); geoentry_search.0 diff --git a/server/src/calendar/snapshots/navigatum_server__calendar__db_tests__index_get-5.snap b/server/src/routes/snapshots/navigatum_server__routes__calendar__db_tests__index_get-5.snap similarity index 96% rename from server/src/calendar/snapshots/navigatum_server__calendar__db_tests__index_get-5.snap rename to server/src/routes/snapshots/navigatum_server__routes__calendar__db_tests__index_get-5.snap index 48fa10e55..9e79f21aa 100644 --- a/server/src/calendar/snapshots/navigatum_server__calendar__db_tests__index_get-5.snap +++ b/server/src/routes/snapshots/navigatum_server__routes__calendar__db_tests__index_get-5.snap @@ -1,5 +1,5 @@ --- -source: src/calendar/mod.rs +source: src/routes/calendar.rs expression: actual --- 5121.EG.003: diff --git a/server/src/calendar/snapshots/navigatum_server__calendar__db_tests__index_get-6.snap b/server/src/routes/snapshots/navigatum_server__routes__calendar__db_tests__index_get-6.snap similarity index 96% rename from server/src/calendar/snapshots/navigatum_server__calendar__db_tests__index_get-6.snap rename to server/src/routes/snapshots/navigatum_server__routes__calendar__db_tests__index_get-6.snap index 650a1039a..2db12f500 100644 --- a/server/src/calendar/snapshots/navigatum_server__calendar__db_tests__index_get-6.snap +++ b/server/src/routes/snapshots/navigatum_server__routes__calendar__db_tests__index_get-6.snap @@ -1,5 +1,5 @@ --- -source: src/calendar/mod.rs +source: src/routes/calendar.rs expression: actual --- 5121.EG.001: diff --git a/server/src/search/search_executor/formatter.rs b/server/src/search_executor/formatter.rs similarity index 98% rename from server/src/search/search_executor/formatter.rs rename to server/src/search_executor/formatter.rs index 1dd3aa536..c5451e7cc 100644 --- a/server/src/search/search_executor/formatter.rs +++ b/server/src/search_executor/formatter.rs @@ -1,8 +1,8 @@ use unicode_truncate::UnicodeTruncateStr; +use super::parser::{ParsedQuery, TextToken}; +use super::ResultEntry; use crate::external::meilisearch::MSHit; -use crate::search::search_executor::parser::{ParsedQuery, TextToken}; -use crate::search::search_executor::ResultEntry; use crate::search::Highlighting; pub(super) struct RoomVisitor { diff --git a/server/src/search/search_executor/lexer.rs b/server/src/search_executor/lexer.rs similarity index 100% rename from server/src/search/search_executor/lexer.rs rename to server/src/search_executor/lexer.rs diff --git a/server/src/search/search_executor/merger.rs b/server/src/search_executor/merger.rs similarity index 98% rename from server/src/search/search_executor/merger.rs rename to server/src/search_executor/merger.rs index 08a41e1d9..7a1ab3bec 100644 --- a/server/src/search/search_executor/merger.rs +++ b/server/src/search_executor/merger.rs @@ -1,11 +1,12 @@ use meilisearch_sdk::search::{SearchResult, SearchResults}; +use super::ResultFacet; use crate::external::meilisearch::MSHit; -use crate::search::search_executor::ResultFacet; +use crate::routes::search::Limits; #[tracing::instrument(skip(merged_results, buildings_results, rooms_results))] pub(super) fn merge_search_results( - limits: &super::Limits, + limits: &Limits, merged_results: &SearchResults, buildings_results: &SearchResults, rooms_results: &SearchResults, diff --git a/server/src/search/search_executor/mod.rs b/server/src/search_executor/mod.rs similarity index 78% rename from server/src/search/search_executor/mod.rs rename to server/src/search_executor/mod.rs index 8f29449c1..c3d7bfe22 100644 --- a/server/src/search/search_executor/mod.rs +++ b/server/src/search_executor/mod.rs @@ -1,14 +1,14 @@ use meilisearch_sdk::client::Client; use parser::TextToken; -use serde::{Deserialize, Serialize}; +use serde::Serialize; use std::fmt::{Debug, Formatter}; use tracing::error; use crate::external::meilisearch::{GeoEntryQuery, MSHit}; +use crate::external::nominatim::Nominatim; use crate::limited::vec::LimitedVec; -use crate::search::search_executor::parser::ParsedQuery; - -use super::{Highlighting, Limits}; +use crate::routes::search::{Highlighting, Limits}; +use crate::search_executor::parser::ParsedQuery; mod formatter; mod lexer; @@ -93,73 +93,14 @@ struct ResultEntry { parsed_id: Option, } -#[derive(Deserialize, Clone)] -struct NominatimAddressResponse { - //postcode: Option, - // country: Option, - // country_code: Option, - // ISO3166-2-lvl4: Option, - state: Option, - county: Option, - town: Option, - suburb: Option, - village: Option, - hamlet: Option, - road: Option, -} - -impl NominatimAddressResponse { - fn serialise(&self) -> String { - let mut result = Vec::::new(); - if let Some(state) = self.state.clone() { - result.push(state); - } - if let Some(county) = self.county.clone() { - result.push(county); - } - if let Some(town) = self.town.clone() { - result.push(town); - } - if let Some(suburb) = self.suburb.clone() { - result.push(suburb); - } - if let Some(village) = self.village.clone() { - result.push(village); - } - if let Some(hamlet) = self.hamlet.clone() { - result.push(hamlet); - } - if let Some(road) = self.road.clone() { - result.push(road); - } - result.join(", ") - } -} - -#[derive(Deserialize, Clone)] -struct NominatimResponse { - /// Example: 371651568 - osm_id: i64, - /// Example: "road", - #[serde(rename = "addresstype")] - address_type: String, - /// Example: "Münchner Straße", - name: String, - address: NominatimAddressResponse, -} - #[tracing::instrument] pub async fn address_search(q: &str) -> LimitedVec { - let url = std::env::var("NOMINATIM_URL") - .unwrap_or_else(|_| "https://nav.tum.de/nominatim".to_string()); - let url = format!("{url}/search?q={q}&addressdetails=1"); - let Ok(nominatim_results) = reqwest::get(&url).await else { - error!("cannot get {url}"); - return LimitedVec::from(vec![]); - }; - let Ok(results) = nominatim_results.json::>().await else { - error!("the results from nomnatim is not what we expected {url}"); - return LimitedVec::from(vec![]); + let results = match Nominatim::address_search(q).await { + Ok(r) => r.0, + Err(e) => { + error!("Error searching for addresses: {e:?}"); + return LimitedVec(vec![]); + } }; let num_results = results.len(); let section = ResultsSection { @@ -337,18 +278,4 @@ mod test { }); } } - - #[test] - fn serialize_address() { - let response = NominatimAddressResponse { - state: None, - county: None, - town: None, - suburb: None, - village: None, - hamlet: None, - road: None, - }; - insta::assert_snapshot!(response.serialise(), @"") - } } diff --git a/server/src/search/search_executor/parser.rs b/server/src/search_executor/parser.rs similarity index 99% rename from server/src/search/search_executor/parser.rs rename to server/src/search_executor/parser.rs index 2726f4db7..512547575 100644 --- a/server/src/search/search_executor/parser.rs +++ b/server/src/search_executor/parser.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; use std::fmt::{Debug, Formatter}; use tracing::warn; -use crate::search::search_executor::lexer::Token; +use super::lexer::Token; #[derive(Clone, Default, PartialEq, Eq)] pub struct Filter { diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-10.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-10.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-10.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-10.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-11.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-11.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-11.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-11.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-12.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-12.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-12.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-12.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-13.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-13.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-13.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-13.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-14.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-14.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-14.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-14.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-15.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-15.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-15.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-15.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-16.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-16.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-16.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-16.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-17.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-17.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-17.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-17.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-18.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-18.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-18.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-18.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-19.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-19.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-19.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-19.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-2.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-2.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-2.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-2.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-20.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-20.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-20.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-20.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-21.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-21.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-21.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-21.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-3.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-3.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-3.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-3.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-4.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-4.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-4.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-4.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-5.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-5.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-5.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-5.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-6.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-6.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-6.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-6.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-7.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-7.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-7.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-7.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-8.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-8.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-8.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-8.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-9.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-9.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-9.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries-9.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__bad_queries.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-10.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-10.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-10.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-10.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-11.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-11.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-11.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-11.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-12.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-12.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-12.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-12.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-13.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-13.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-13.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-13.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-14.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-14.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-14.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-14.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-15.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-15.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-15.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-15.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-16.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-16.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-16.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-16.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-17.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-17.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-17.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-17.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-18.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-18.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-18.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-18.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-19.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-19.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-19.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-19.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-2.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-2.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-2.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-2.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-20.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-20.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-20.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-20.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-21.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-21.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-21.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-21.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-22.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-22.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-22.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-22.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-23.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-23.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-23.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-23.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-24.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-24.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-24.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-24.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-25.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-25.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-25.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-25.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-26.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-26.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-26.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-26.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-27.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-27.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-27.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-27.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-28.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-28.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-28.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-28.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-29.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-29.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-29.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-29.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-3.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-3.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-3.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-3.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-30.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-30.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-30.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-30.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-31.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-31.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-31.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-31.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-32.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-32.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-32.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-32.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-33.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-33.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-33.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-33.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-34.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-34.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-34.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-34.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-35.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-35.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-35.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-35.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-36.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-36.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-36.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-36.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-37.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-37.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-37.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-37.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-4.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-4.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-4.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-4.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-5.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-5.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-5.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-5.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-6.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-6.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-6.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-6.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-7.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-7.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-7.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-7.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-8.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-8.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-8.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-8.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-9.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-9.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-9.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries-9.snap diff --git a/server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries.snap b/server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries.snap similarity index 100% rename from server/src/search/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries.snap rename to server/src/search_executor/snapshots/navigatum_server__search__search_executor__test__good_queries.snap diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-10.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-10.snap new file mode 100644 index 000000000..79719dd5a --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-10.snap @@ -0,0 +1,62 @@ +--- +source: src/search_executor/mod.rs +description: typo with short word and at first letter +expression: actual +info: "'f abuer' should get '5602.EG.001' in 1 results # typo with short word and at first letter" +--- +- facet: rooms + entries: + - id: 2805.EG.005 + type: room + name: 2805.EG.005 (Büro) + subtext: "Dachau, Karl-Benz-Straße" + subtext_bold: 1.F.1@2805 + - id: 2805.EG.011 + type: room + name: 2805.EG.011 (Technik/fensterlos) + subtext: "Dachau, Karl-Benz-Straße" + subtext_bold: 2.F.2@2805 + - id: 2805.EG.030 + type: room + name: 2805.EG.030 (Flur-Nord) + subtext: "Dachau, Karl-Benz-Straße" + subtext_bold: F-NORD@2805 + - id: 0508.EG.806 + type: room + name: "0508.EG.806 (Gruppenraum \u0019f\u0017. Praktika)" + subtext: "stammgelände, Heizkraftwerk (Z8)" + subtext_bold: 0806@0508 + - id: 2913.01.110 + type: room + name: 2913.01.110 (Seminarraum) + subtext: "stammgelände, Brienner Forum Haus F (AM)" + subtext_bold: F.1.10@2913 + - id: 2913.01.111 + type: room + name: 2913.01.111 (Seminarraum) + subtext: "stammgelände, Brienner Forum Haus F (AM)" + subtext_bold: F.1.11@2913 + - id: 2913.01.112 + type: room + name: 2913.01.112 (Seminarraum) + subtext: "stammgelände, Brienner Forum Haus F (AM)" + subtext_bold: F.1.12@2913 + - id: 5407.EG.651E + type: room + name: "5407.EG.651E (Phys.Messr.\u0019f\u0017.instr.Analytik)" + subtext: "garching, Chemie" + subtext_bold: 16515@5407 + n_visible: 8 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: "2913" + type: building + name: "Brienner Forum Haus \u0019F\u0017 (AM)" + subtext: Gebäude + - id: "2607" + type: building + name: "Fahrzeughalle (BL. \u0019F\u0017)" + subtext: Gebäude + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-11.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-11.snap new file mode 100644 index 000000000..9777c86bd --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-11.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "main room called 'service desk', only all 114abc.. subrooms have 'ssz' in the name" +expression: actual +info: "'ssz' should get '0501.EG.144' in 1 results # main room called 'service desk', only all 114abc.. subrooms have 'ssz' in the name" +--- +- facet: rooms + entries: + - id: 0501.EG.144A + type: room + name: "0501.EG.144A (\u0019SSZ\u0017 Info)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0144A@0501 + - id: 0501.EG.144B + type: room + name: "0501.EG.144B (\u0019SSZ\u0017 Info)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0144B@0501 + - id: 0501.EG.144C + type: room + name: "0501.EG.144C (\u0019SSZ\u0017 Info)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0144C@0501 + - id: 0501.EG.144D + type: room + name: "0501.EG.144D (\u0019SSZ\u0017 Info)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0144D@0501 + - id: 0501.EG.144E + type: room + name: "0501.EG.144E (\u0019SSZ\u0017 Info)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0144E@0501 + - id: 0501.EG.144F + type: room + name: "0501.EG.144F (\u0019SSZ\u0017 Info)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0144F@0501 + - id: 0501.EG.144G + type: room + name: "0501.EG.144G (\u0019SSZ\u0017 Info)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0144G@0501 + - id: 0501.EG.144H + type: room + name: "0501.EG.144H (\u0019SSZ\u0017 Info)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0144H@0501 + - id: 0501.EG.148 + type: room + name: "0501.EG.148 (Teeküche \u0019SSZ\u0017)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0148@0501 + - id: 0505.EG.561 + type: room + name: "0505.EG.561 (Sekretariat \u0019SSZ\u0017/HR S+L / Recht)" + subtext: "stammgelände, Wirtschaftswissenschaften (Z5)" + subtext_bold: 0561@0505 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-12.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-12.snap new file mode 100644 index 000000000..f6fb3888a --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-12.snap @@ -0,0 +1,29 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'Immathalle' should get '0501.EG.136' in 1 results" +--- +- facet: rooms + entries: + - id: 0501.EG.130C + type: room + name: "0501.EG.130C (Küche \u0019Immatrikulationshalle\u0017)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0130C@0501 + - id: 0501.EG.136 + type: room + name: "0501.EG.136 (\u0019Immatrikulationshalle\u0017)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0136@0501 + - id: 0501.EG.140 + type: room + name: "0501.EG.140 (Durchgangshalle zur \u0019Immathalle\u0017)" + subtext: "stammgelände, Hauptgebäude (Z1)" + subtext_bold: 0140@0501 + n_visible: 3 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-13.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-13.snap new file mode 100644 index 000000000..ae11e58b5 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-13.snap @@ -0,0 +1,14 @@ +--- +source: src/search_executor/mod.rs +description: Copy/paste from real search +expression: actual +info: "'Augustenstraße 44; Raum 209; 2.OG' should get '2903.02.209' in 1 results # Copy/paste from real search" +--- +- facet: rooms + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-14.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-14.snap new file mode 100644 index 000000000..1ce61b5c4 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-14.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "there are two basic lab course rooms, this is one of them" +expression: actual +info: "'praktikumsraum mi' should get '5604.EG.038' in 2 results # there are two basic lab course rooms, this is one of them" +--- +- facet: rooms + entries: + - id: 5605.01.012 + type: room + name: "5605.01.012 (\u0019Praktikumsraum\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.05.012@5605 + - id: 5605.01.013 + type: room + name: "5605.01.013 (\u0019Praktikumsraum\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.05.013@5605 + - id: 5605.02.014 + type: room + name: "5605.02.014 (\u0019Praktikumsraum\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 02.05.014@5605 + - id: 5605.02.033 + type: room + name: "5605.02.033 (\u0019Praktikumsraum\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 02.05.033@5605 + - id: 5605.03.012 + type: room + name: "5605.03.012 (\u0019Praktikumsraum\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.05.012@5605 + - id: 5605.03.014 + type: room + name: "5605.03.014 (\u0019Praktikumsraum\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.05.014@5605 + - id: 5605.03.057 + type: room + name: "5605.03.057 (\u0019Praktikumsraum\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.05.057@5605 + - id: 5607.01.012 + type: room + name: "5607.01.012 (\u0019Praktikumsraum\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.07.012@5607 + - id: 5608.01.011 + type: room + name: "5608.01.011 (\u0019Praktikumsraum\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.08.011@5608 + - id: 5608.01.020 + type: room + name: "5608.01.020 (\u0019Praktikumsraum\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.08.020@5608 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-15.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-15.snap new file mode 100644 index 000000000..135083a8b --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-15.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "'5604.02.033' is a valid result before the two lab course rooms" +expression: actual +info: "'physik labor mi' should get '5604.EG.036' in 3 results # '5604.02.033' is a valid result before the two lab course rooms" +--- +- facet: rooms + entries: + - id: 0104.U1.404 + type: room + name: "0104.U1.404 (\u0019Mi\u0017krostr. Bauele.-\u0019Labor\u0017)" + subtext: "stammgelände, E-Technik Elektrophysik (N4)" + subtext_bold: N-1404@0104 + - id: 0104.EG.426 + type: room + name: "0104.EG.426 (\u0019Physiklabor\u0017 \u0019mi\u0017t elektromagnetischer Abschir)" + subtext: "stammgelände, E-Technik Elektrophysik (N4)" + subtext_bold: N0426@0104 + - id: 5501.01.108 + type: room + name: "5501.01.108 (\u0019Mi\u0017krotechniklabor)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1108@5501 + - id: 4224.01.136 + type: room + name: "4224.01.136 (\u0019Mi\u0017kroskopie)" + subtext: "weihenstephan, ZIEL IV - Biowissenschaften" + subtext_bold: 1.36@4224 + - id: 4224.01.156 + type: room + name: "4224.01.156 (\u0019Mi\u0017kroskopierraum S1-Genlabor)" + subtext: "weihenstephan, ZIEL IV - Biowissenschaften" + subtext_bold: 1.56@4224 + - id: 4317.01.121 + type: room + name: "4317.01.121 (\u0019Mi\u0017kroskopierraum)" + subtext: "weihenstephan, Tierwissenschaften" + subtext_bold: 1.21@4317 + - id: 4404.EG.003 + type: room + name: "4404.EG.003 (\u0019Mi\u0017kroskopie)" + subtext: "limnologische-station-iffeldorf, Seminargebäude" + subtext_bold: 003@4404 + - id: 0103.U1.301 + type: room + name: "0103.U1.301 (FIB-\u0019Mi\u0017kroskopierraum)" + subtext: "stammgelände, E-Technik El. Maschinen / Geräte (N3)" + subtext_bold: "-1301@0103" + - id: 4124.EG.320 + type: room + name: "4124.EG.320 (L1 \u0019Mi\u0017kroorganismen)" + subtext: "weihenstephan, ZIEL II – Molekulare Biowissenschaften" + subtext_bold: E/3.20@4124 + - id: 4124.EG.321 + type: room + name: "4124.EG.321 (L1 \u0019Mi\u0017kroorganismen)" + subtext: "weihenstephan, ZIEL II – Molekulare Biowissenschaften" + subtext_bold: E/3.21@4124 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-16.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-16.snap new file mode 100644 index 000000000..d04a92b73 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-16.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "typo + it's 'Fachschaftsbüro' in the data" +expression: actual +info: "'fachschaft pyhsik' should get '5101.EG.257' in 1 results # typo + it's 'Fachschaftsbüro' in the data" +--- +- facet: rooms + entries: + - id: 0104.EG.413 + type: room + name: "0104.EG.413 (Elektroniklabor \u0019Fachschaft\u0017 EI)" + subtext: "stammgelände, E-Technik Elektrophysik (N4)" + subtext_bold: N0413@0104 + - id: 5101.EG.257 + type: room + name: "5101.EG.257 (Büro \u0019Fachschaft\u0017 Mathe \u0019Physik\u0017 Informatik Chemie / MPIC)" + subtext: "garching, Physik I" + subtext_bold: 2257@5101 + - id: 5606.EG.036 + type: room + name: "5606.EG.036 (Büro \u0019Fachschaft\u0017 Mathe \u0019Physik\u0017 Informatik Chemie / MPIC)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.06.036@5606 + - id: 5606.EG.037 + type: room + name: "5606.EG.037 (Besprechungsraum \u0019Fachschaft\u0017 Mathe \u0019Physik\u0017 Informatik Chemie / MPIC)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.06.037@5606 + - id: 5406.01.650C + type: room + name: "5406.01.650C (Büro \u0019Fachschaft\u0017 Mathe \u0019Physik\u0017 Informatik Chemie / MPIC)" + subtext: "garching, Chemie" + subtext_bold: 26503@5406 + - id: 5606.EG.038 + type: room + name: "5606.EG.038 (Lager \u0019Fachschaft\u0017 Mathe \u0019Physik\u0017 Informatik Chemie / MPIC)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.06.038@5606 + - id: 5606.EG.039 + type: room + name: "5606.EG.039 (Skriptenverkauf \u0019Fachschaft\u0017 Mathe \u0019Physik\u0017 Informatik Chemie / MPIC)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.06.039@5606 + - id: 2333.01.103 + type: room + name: "2333.01.103 (\u0019Fachschaft\u0017 Sport)" + subtext: "campus-im-olympiapark-sz, CiO/SG Hallen Ost" + subtext_bold: 01.2333.103@2333 + - id: 9377.01.130 + type: room + name: "9377.01.130 (Projektraum \u0019Fachschaft\u0017)" + subtext: "taufkirchen-ottobr., Lise-Meitner-Straße 9-11" + subtext_bold: 01.130@9377 + - id: 0504.EG.424 + type: room + name: "0504.EG.424 (Arbeitsraum/Studenten/\u0019Fachschaft\u0017)" + subtext: "stammgelände, Landwirtschaftsbau (Z4)" + subtext_bold: 0424@0504 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-17.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-17.snap new file mode 100644 index 000000000..f045482d2 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-17.snap @@ -0,0 +1,63 @@ +--- +source: src/search_executor/mod.rs +description: "H.003 is the correct room, but people have problems remembering how many zeroes are in the room number" +expression: actual +info: "'H.0003' should get '2910.EG.003' in 1 results # H.003 is the correct room, but people have problems remembering how many zeroes are in the room number" +--- +- facet: sites_buildings + entries: + - id: "2910" + type: building + name: "Richard-Wagner-Str. 1 / Haus B + Haus \u0019H\u0017, Hochschule für Politik (HfP)/ Department of Governance (GOV)" + subtext: Gebäude + n_visible: 1 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 2910.01.101 + type: room + name: 2910.01.101 (Gruppenarbeitsraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.101@2910 + - id: 2910.01.102 + type: room + name: 2910.01.102 (Gruppenarbeitsraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.102@2910 + - id: 2910.02.202 + type: room + name: 2910.02.202 (Seminarraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.202@2910 + - id: 2910.02.204 + type: room + name: 2910.02.204 (Seminarraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.204@2910 + - id: 2910.02.206 + type: room + name: 2910.02.206 (Seminarraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.206@2910 + - id: 2910.EG.001 + type: room + name: 2910.EG.001 (Seminarraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.001@2910 + - id: 2910.EG.002 + type: room + name: 2910.EG.002 (Seminarraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.002@2910 + - id: 2910.EG.003 + type: room + name: 2910.EG.003 (Seminarraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.003@2910 + - id: 5212.01.028 + type: room + name: 5212.01.028 (Gemeinschaftsraum) + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.1.028@5212 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-18.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-18.snap new file mode 100644 index 000000000..f63038ea7 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-18.snap @@ -0,0 +1,66 @@ +--- +source: src/search_executor/mod.rs +description: "H.003 is the correct room, but people have problems remembering how many zeroes are in the room number" +expression: actual +info: "'H.03' should get '2910.EG.003' in 1 results # H.003 is the correct room, but people have problems remembering how many zeroes are in the room number" +--- +- facet: rooms + entries: + - id: 5212.01.030 + type: room + name: "5212.01.\u001903\u00170 (Gemeinschaftsraum)" + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.1.030@5212 + - id: 5212.02.030 + type: room + name: "5212.02.\u001903\u00170 (Gemeinschaftsraum)" + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.2.030@5212 + - id: 2910.EG.031 + type: room + name: "2910.EG.\u001903\u00171 (WC-Herren)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.031@2910 + parsed_id: "\u0019H.03\u00171 RiWa 1 (HfP/GOV)" + - id: 2910.EG.032 + type: room + name: "2910.EG.\u001903\u00172 (WC-Barrierefrei)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.032@2910 + parsed_id: "\u0019H.03\u00172 RiWa 1 (HfP/GOV)" + - id: 2910.03.301 + type: room + name: "2910.\u001903\u0017.301 (Büro)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.301@2910 + - id: 2910.03.302 + type: room + name: "2910.\u001903\u0017.302 (Büro)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.302@2910 + - id: 2910.03.303 + type: room + name: "2910.\u001903\u0017.303 (Büro)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.303@2910 + - id: 2910.03.304 + type: room + name: "2910.\u001903\u0017.304 (Büro)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.304@2910 + - id: 2910.03.305 + type: room + name: "2910.\u001903\u0017.305 (Büro)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.305@2910 + - id: 2910.03.306 + type: room + name: "2910.\u001903\u0017.306 (Büro)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.306@2910 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-19.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-19.snap new file mode 100644 index 000000000..2804d486d --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-19.snap @@ -0,0 +1,66 @@ +--- +source: src/search_executor/mod.rs +description: "H.003 is the correct room, but people have problems remembering how many zeroes are in the room number" +expression: actual +info: "'H.3' should get '2910.EG.003' in 1 results # H.003 is the correct room, but people have problems remembering how many zeroes are in the room number" +--- +- facet: rooms + entries: + - id: 5212.01.028 + type: room + name: 5212.01.028 (Gemeinschaftsraum) + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.1.028@5212 + - id: 5212.01.030 + type: room + name: 5212.01.030 (Gemeinschaftsraum) + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.1.030@5212 + - id: 5212.02.028 + type: room + name: 5212.02.028 (Gemeinschaftsraum) + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.2.028@5212 + - id: 5212.02.030 + type: room + name: 5212.02.030 (Gemeinschaftsraum) + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.2.030@5212 + - id: 5212.EG.006 + type: room + name: 5212.EG.006 (Seminar 1) + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.0.006@5212 + - id: 4124.U1.001A + type: room + name: 4124.U1.001A (Praktikum (Hinterer Raumteil)) + subtext: "weihenstephan, ZIEL II – Molekulare Biowissenschaften" + subtext_bold: P/1.01 H@4124 + - id: 5212.EG.007 + type: room + name: "5212.EG.007 (Wischtest, freig.)" + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.0.007@5212 + - id: 5212.EG.603 + type: room + name: 5212.EG.603 (Pers. Dekont./Dusche) + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.0.603@5212 + - id: 2910.03.301 + type: room + name: "2910.03.\u00193\u001701 (Büro)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.301@2910 + parsed_id: "\u0019H.3\u001701 RiWa 1 (HfP/GOV)" + - id: 2910.03.302 + type: room + name: "2910.03.\u00193\u001702 (Büro)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.302@2910 + parsed_id: "\u0019H.3\u001702 RiWa 1 (HfP/GOV)" + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-2.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-2.snap new file mode 100644 index 000000000..a4a8cf850 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-2.snap @@ -0,0 +1,62 @@ +--- +source: src/search_executor/mod.rs +description: target is hallucinated as it currently does not exist +expression: actual +info: "'tb innenstadt' should get 'tb-arcisstraße' in 1 results # target is hallucinated as it currently does not exist" +--- +- facet: sites_buildings + entries: + - id: "4220" + type: building + name: "\u0019Teilbibliothek\u0017 Weihenstephan, Pressestelle Datenverarbeitung" + subtext: Gebäude + - id: "5401" + type: building + name: "\u0019Teilbibliothek\u0017 Chemie, Hörsaal (CH1, dunkelgrün)" + subtext: Gebäudeteil + n_visible: 2 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5401.01.101K + type: room + name: 5401.01.101K (Hans-Fischer-Hörsaal) + subtext: "garching, Chemie" + subtext_bold: 21010@5401 + - id: 4220.01.001 + type: room + name: 4220.01.001 (Einzelarbeitsraum) + subtext: "weihenstephan, Teilbibliothek Weihenstephan, Pressestelle Datenverarbeitung" + subtext_bold: OG R 01@4220 + - id: 4220.01.002 + type: room + name: 4220.01.002 (Einzelarbeitsraum) + subtext: "weihenstephan, Teilbibliothek Weihenstephan, Pressestelle Datenverarbeitung" + subtext_bold: OG R 02@4220 + - id: 4220.01.003 + type: room + name: 4220.01.003 (Einzelarbeitsraum) + subtext: "weihenstephan, Teilbibliothek Weihenstephan, Pressestelle Datenverarbeitung" + subtext_bold: OG R 03@4220 + - id: 4220.01.004 + type: room + name: 4220.01.004 (Einzelarbeitsraum) + subtext: "weihenstephan, Teilbibliothek Weihenstephan, Pressestelle Datenverarbeitung" + subtext_bold: OG R 04@4220 + - id: 4220.01.005 + type: room + name: 4220.01.005 (Einzelarbeitsraum) + subtext: "weihenstephan, Teilbibliothek Weihenstephan, Pressestelle Datenverarbeitung" + subtext_bold: OG R 05@4220 + - id: 4220.01.006 + type: room + name: 4220.01.006 (Einzelarbeitsraum) + subtext: "weihenstephan, Teilbibliothek Weihenstephan, Pressestelle Datenverarbeitung" + subtext_bold: OG R 06@4220 + - id: 4220.01.007 + type: room + name: 4220.01.007 (Einzelarbeitsraum) + subtext: "weihenstephan, Teilbibliothek Weihenstephan, Pressestelle Datenverarbeitung" + subtext_bold: OG R 07@4220 + n_visible: 8 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-20.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-20.snap new file mode 100644 index 000000000..e33f5fc58 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-20.snap @@ -0,0 +1,26 @@ +--- +source: src/search_executor/mod.rs +description: "The architects name is a N2119. There are other rooms which are actually named '2119', which means 4 is the best case." +expression: actual +info: "'2119' should get '0101.02.119' in 4 results # The architects name is a N2119. There are other rooms which are actually named '2119', which means 4 is the best case." +--- +- facet: rooms + entries: + - id: 5101.EG.119 + type: room + name: 5101.EG.119 (Physiklabor (einfach)) + subtext: "garching, Physik I" + subtext_bold: 2119@5101 + parsed_id: "PH \u00192119\u0017" + - id: 5413.01.119 + type: room + name: 5413.01.119 (Kopierer) + subtext: "garching, BNMRZ Bayerisches NMR-Zentrum" + subtext_bold: 2119@5413 + parsed_id: "\u00192119\u0017 BNMRZ B…MR-Zentrum" + n_visible: 2 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-21.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-21.snap new file mode 100644 index 000000000..ec177e0b0 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-21.snap @@ -0,0 +1,63 @@ +--- +source: src/search_executor/mod.rs +description: Architects names should be matchable literally +expression: actual +info: "'N1406' should get '0104.01.406' in 1 results # Architects names should be matchable literally" +--- +- facet: rooms + entries: + - id: 0104.U1.406 + type: room + name: 0104.U1.406 (Physikal. Versuchslabor) + subtext: "stammgelände, E-Technik Elektrophysik (N4)" + subtext_bold: N-1406@0104 + - id: 0104.01.406 + type: room + name: 0104.01.406 (Studentenarb. m. DV) + subtext: "stammgelände, E-Technik Elektrophysik (N4)" + subtext_bold: N1406@0104 + - id: 0103.U1.311 + type: room + name: 0103.U1.311 (Praktikum/Umbau) + subtext: "stammgelände, E-Technik El. Maschinen / Geräte (N3)" + subtext_bold: N-1311@0103 + - id: 0108.U1.806A + type: room + name: 0108.U1.806A (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1806A@0108 + - id: 0108.U1.806B + type: room + name: 0108.U1.806B (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1806B@0108 + - id: 0108.U1.825 + type: room + name: 0108.U1.825 (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1825@0108 + - id: 0108.U1.825A + type: room + name: 0108.U1.825A (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1825A@0108 + - id: 9201.EG.005 + type: room + name: 9201.EG.005 (Seminarraum 2) + subtext: TUM FZ Friedrich N. Schwarz Berchtesgaden + subtext_bold: EG-05@9201 + - id: 9201.EG.006 + type: room + name: 9201.EG.006 (Seminarraum 1) + subtext: TUM FZ Friedrich N. Schwarz Berchtesgaden + subtext_bold: EG-06@9201 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: "9201" + type: building + name: "TUM FZ Friedrich \u0019N\u0017. Schwarz Berchtesgaden" + subtext: Gebäude + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-3.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-3.snap new file mode 100644 index 000000000..913b99c83 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-3.snap @@ -0,0 +1,60 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'interims I' should get '5620' in 1 results" +--- +- facet: sites_buildings + entries: + - id: garching-interims + type: area + name: "\u0019Interimshörsäle\u0017" + subtext: Gebiet / Gruppe von Gebäuden + - id: "5620" + type: building + name: "\u0019Interimshörsäle\u0017 \u0019I\u0017" + subtext: Gebäude + - id: "5416" + type: building + name: "\u0019Interimshörsäle\u0017 \u0019I\u0017I, Jürgen Manchot-Hörsaalgebäude" + subtext: Gebäude + - id: "5539" + type: building + name: "\u0019Interims\u0017-Tentomax MW" + subtext: Gebäude + n_visible: 4 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5620.01.101 + type: room + name: "5620.01.101 (Hörsaal 1, \"\u0019Interims\u0017 \u0019I\u0017\")" + subtext: "garching, Interims I" + subtext_bold: 101@5620 + - id: 5620.01.102 + type: room + name: "5620.01.102 (Hörsaal 2, \"\u0019Interims\u0017 \u0019I\u0017\")" + subtext: "garching, Interims I" + subtext_bold: 102@5620 + - id: 5416.01.003 + type: room + name: "5416.01.003 (Hörsaal 2, \"\u0019Interims\u0017 \u0019I\u0017I\")" + subtext: "garching, Interims II" + subtext_bold: 003@5416 + - id: 5416.01.004 + type: room + name: "5416.01.004 (Hörsaal 1, Jürgen-Manchot-Hörsaal)" + subtext: "garching, Interims II" + subtext_bold: 004@5416 + - id: 5539.EG.001A + type: room + name: "5539.EG.001A (Hörsaal 1A, \"Zelt\")" + subtext: "garching, Interims III" + subtext_bold: 0.001A@5539 + - id: 5539.EG.001B + type: room + name: "5539.EG.001B (Hörsaal 1B, \"Zelt\")" + subtext: "garching, Interims III" + subtext_bold: 0.001B@5539 + n_visible: 6 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-4.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-4.snap new file mode 100644 index 000000000..0194df7ad --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-4.snap @@ -0,0 +1,61 @@ +--- +source: src/search_executor/mod.rs +description: "Note: It is not really in Arcisstr., just close" +expression: actual +info: "'Studitum Arcisstr' should get '0201' in 1 results # Note: It is not really in Arcisstr., just close" +--- +- facet: sites_buildings + entries: + - id: "5532" + type: building + name: "\u0019StudiTUM\u0017 Garching" + subtext: Gebäude + - id: "0201" + type: building + name: "\u0019StudiTUM\u0017 Innenstadt (S1)" + subtext: Gebäude + - id: "4113" + type: building + name: "\u0019StudiTUM\u0017 Weihenstephan" + subtext: Gebäude + n_visible: 3 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 4113.01.105 + type: room + name: 4113.01.105 (Hörsaal 4 (WZWH04)) + subtext: "weihenstephan, StudiTUM" + subtext_bold: O1 5@4113 + - id: 0201.01.001 + type: room + name: 0201.01.001 (Stillarbeitsraum) + subtext: "stammgelände, StudiTUM" + subtext_bold: 1.01@0201 + - id: 0201.01.002 + type: room + name: 0201.01.002 (Einzelarbeitsraum) + subtext: "stammgelände, StudiTUM" + subtext_bold: 1.02@0201 + - id: 0201.01.003 + type: room + name: 0201.01.003 (Einzelarbeitsraum) + subtext: "stammgelände, StudiTUM" + subtext_bold: 1.03@0201 + - id: 0201.01.007 + type: room + name: 0201.01.007 (Gruppenarbeitsraum) + subtext: "stammgelände, StudiTUM" + subtext_bold: 1.07@0201 + - id: 0201.01.008 + type: room + name: 0201.01.008 (Einzelarbeitsraum) + subtext: "stammgelände, StudiTUM" + subtext_bold: 1.08@0201 + - id: 0201.02.001 + type: room + name: 0201.02.001 (Stillarbeitsraum) + subtext: "stammgelände, StudiTUM" + subtext_bold: 2.01@0201 + n_visible: 7 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-5.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-5.snap new file mode 100644 index 000000000..daebc848c --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-5.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "uses 'str.' instead of 'straße'" +expression: actual +info: "'Karlsstr. 47' should get '2906' in 1 results # uses 'str.' instead of 'straße'" +--- +- facet: rooms + entries: + - id: 2906.01.025 + type: room + name: 2906.01.025 (Karlstraße-Seminarraum) + subtext: Karlstraße 45/47 + subtext_bold: 1025@2906 + - id: 2906.02.026 + type: room + name: 2906.02.026 (Karlstraße-Seminarraum) + subtext: Karlstraße 45/47 + subtext_bold: 2026@2906 + - id: 2906.03.001 + type: room + name: 2906.03.001 (Seminarraum) + subtext: Karlstraße 45/47 + subtext_bold: 3001@2906 + - id: 2906.04.002 + type: room + name: 2906.04.002 (Seminarraum) + subtext: Karlstraße 45/47 + subtext_bold: 4002@2906 + - id: 2906.04.004 + type: room + name: 2906.04.004 (Seminarraum) + subtext: Karlstraße 45/47 + subtext_bold: 4004@2906 + - id: 2906.04.006 + type: room + name: 2906.04.006 (Seminarraum) + subtext: Karlstraße 45/47 + subtext_bold: 4006@2906 + - id: 2906.04.010 + type: room + name: 2906.04.010 (Seminarraum) + subtext: Karlstraße 45/47 + subtext_bold: 4010@2906 + - id: 2906.05.001 + type: room + name: 2906.05.001 (Unterrichtsraum) + subtext: Karlstraße 45/47 + subtext_bold: 5001@2906 + - id: 2906.DG.009 + type: room + name: 2906.DG.009 (Seminarraum) + subtext: Karlstraße 45/47 + subtext_bold: 6009@2906 + - id: 2906.02.001 + type: room + name: 2906.02.001 (Bibliothek) + subtext: Karlstraße 45/47 + subtext_bold: 2001@2906 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-6.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-6.snap new file mode 100644 index 000000000..6def89b23 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-6.snap @@ -0,0 +1,75 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'mi hs 1' should get '5602.EG.001' in 1 results" +--- +- facet: sites_buildings + entries: + - id: "5602" + type: building + name: "\u0019Hörsaal\u0017 \u00191\u0017 (BT02)" + subtext: Gebäudeteil + - id: mi + type: joined_building + name: "Fakultät Mathematik & Informatik (FMI oder \u0019MI\u0017)" + subtext: Gebäudekomplex + - id: "5605" + type: building + name: Finger 05 (BT05) + subtext: Gebäudeteil + - id: "5606" + type: building + name: Finger 06 (BT06) + subtext: Gebäudeteil + n_visible: 1 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5602.EG.001 + type: room + name: "5602.EG.001 (\u0019MI\u0017 \u0019HS\u0017 \u00191\u0017, Friedrich L. Bauer \u0019Hörsaal\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.02.001@5602 + - id: 5602.EG.002 + type: room + name: "5602.EG.002 (\u0019MI\u0017 \u0019Hörsaal\u0017 Regieraum)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.02.002@5602 + - id: 5602.U1.001 + type: room + name: 5602.U1.001 (Technikraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: "-1.02.001@5602" + - id: 5602.U1.004 + type: room + name: 5602.U1.004 (Treppe im Freien) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: "-1.02.004@5602" + - id: 5604.EG.011 + type: room + name: "5604.EG.011 (\u0019MI\u0017 \u0019Hörsaal\u0017 2)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.011@5604 + - id: 5606.EG.011 + type: room + name: "5606.EG.011 (\u0019MI\u0017 \u0019Hörsaal\u0017 3)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.06.011@5606 + - id: 5601.EG.001 + type: room + name: 5601.EG.001 (Magistrale) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.001@5601 + - id: 5603.01.011 + type: room + name: 5603.01.011 (Gruppenarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.011@5603 + - id: 5603.01.031B + type: room + name: 5603.01.031B (Einzelarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.031B@5603 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-7.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-7.snap new file mode 100644 index 000000000..897d96e12 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-7.snap @@ -0,0 +1,14 @@ +--- +source: src/search_executor/mod.rs +description: "old name before the NS renamings was 'MW 0001, Gustav-Niemann-Hörsaal', changed in Q1 24" +expression: actual +info: "'niemann' should get '5510.EG.001' in 1 results # old name before the NS renamings was 'MW 0001, Gustav-Niemann-Hörsaal', changed in Q1 24" +--- +- facet: rooms + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-8.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-8.snap new file mode 100644 index 000000000..a3d854ec6 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-8.snap @@ -0,0 +1,59 @@ +--- +source: src/search_executor/mod.rs +description: "old name before the NS renamings was 'MW 0001, Gustav-Niemann-Hörsaal', changed in Q1 24" +expression: actual +info: "'mw g niemann' should get '5510.EG.001' in 1 results # old name before the NS renamings was 'MW 0001, Gustav-Niemann-Hörsaal', changed in Q1 24" +--- +- facet: sites_buildings + entries: + - id: mw + type: joined_building + name: "Maschinenwesen (\u0019MW\u0017)" + subtext: Gebäudekomplex + - id: "5506" + type: building + name: "Gebäudeteil 6, Institut für Luft- und Raumfahrt" + subtext: Gebäudeteil + - id: "5501" + type: building + name: "Gebäudeteil 1, Institut für Mechatronik" + subtext: Gebäudeteil + - id: "5502" + type: building + name: "Gebäudeteil 2, Institut für Werkstoffe und Verarbeitung" + subtext: Gebäudeteil + - id: "5504" + type: building + name: "Gebäudeteil 4, Institut für Verfahrenstechnik" + subtext: Gebäudeteil + n_visible: 5 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5510.02.001 + type: room + name: "5510.02.001 (\u0019MW\u0017 2001 Rudolf-Diesel-Hörsaal)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 2001@5510 + - id: 5502.01.250 + type: room + name: 5502.01.250 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1250@5502 + - id: 5502.EG.250 + type: room + name: 5502.EG.250 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0250@5502 + - id: 5503.EG.350 + type: room + name: 5503.EG.350 (Egbert-von-Hoyer-Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0350@5503 + - id: 5506.EG.608M + type: room + name: 5506.EG.608M (Otto-Lilienthal-Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0608M@5506 + n_visible: 5 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-9.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-9.snap new file mode 100644 index 000000000..fae68a8db --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries-9.snap @@ -0,0 +1,14 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'CH22209' should get '5402.01.220J' in 1 results" +--- +- facet: rooms + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries.snap new file mode 100644 index 000000000..d353212de --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__bad_queries.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: target is hallucinated as it currently does not exist +expression: actual +info: "'mathe bib' should get 'mi-bib' in 1 results # target is hallucinated as it currently does not exist" +--- +- facet: rooms + entries: + - id: 5603.01.011 + type: room + name: 5603.01.011 (Gruppenarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.011@5603 + - id: 5603.01.031B + type: room + name: 5603.01.031B (Einzelarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.031B@5603 + - id: 5603.01.032 + type: room + name: 5603.01.032 (Gruppenarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.032@5603 + - id: 5603.01.033A + type: room + name: 5603.01.033A (Einzelarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.033A@5603 + - id: 5603.01.033B + type: room + name: 5603.01.033B (Einzelarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.033B@5603 + - id: 5603.01.035A + type: room + name: 5603.01.035A (Einzelarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.035A@5603 + - id: 5603.01.035B + type: room + name: 5603.01.035B (Einzelarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.035B@5603 + - id: 5603.01.036 + type: room + name: 5603.01.036 (Gruppenarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.036@5603 + - id: 5603.01.037A + type: room + name: 5603.01.037A (Einzelarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.037A@5603 + - id: 5603.01.037B + type: room + name: 5603.01.037B (Einzelarbeitsraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 01.03.037B@5603 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-10.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-10.snap new file mode 100644 index 000000000..edbdf7a24 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-10.snap @@ -0,0 +1,60 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'ZIEL' should get 'wzw-ziel' in 1 results" +--- +- facet: sites_buildings + entries: + - id: wzw-ziel + type: area + name: "\u0019ZIEL\u0017 – Institute for Food & Health" + subtext: Gebiet / Gruppe von Gebäuden + - id: "4224" + type: building + name: "\u0019ZIEL\u0017 IV - Biowissenschaften" + subtext: Gebäude + - id: "4124" + type: building + name: "\u0019ZIEL\u0017 II – Molekulare Biowissenschaften" + subtext: Gebäude + - id: "4126" + type: building + name: "\u0019ZIEL\u0017 I – Zentralinstitut für Ernährungs- und Lebensmittelforschung, Geschäftsstelle und Akademie" + subtext: Gebäude + n_visible: 4 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 4124.U1.104 + type: room + name: 4124.U1.104 (Seminarraum 23 /Übungsraum (WZWS23)) + subtext: "weihenstephan, ZIEL II – Molekulare Biowissenschaften" + subtext_bold: U/1.04@4124 + - id: 4126.01.609B + type: room + name: 4126.01.609B (Seminarraum 14 (WZWS14)) + subtext: "weihenstephan, ZIEL I – Zentralinstitut für Ernährungs- und Lebensmittelforschung, Geschäftsstelle und Akademie" + subtext_bold: O.09 a/b@4126 + - id: 4126.U1.610B + type: room + name: 4126.U1.610B (Seminarraum (gem. Nutzung 1124302030;11243) + subtext: "weihenstephan, ZIEL I – Zentralinstitut für Ernährungs- und Lebensmittelforschung, Geschäftsstelle und Akademie" + subtext_bold: U 10/2@4126 + - id: 4224.01.148 + type: room + name: 4224.01.148 (Seminarraum 51 (WZWS51)) + subtext: "weihenstephan, ZIEL IV - Biowissenschaften" + subtext_bold: 1.48@4224 + - id: 4224.02.234 + type: room + name: 4224.02.234 (Seminarraum 52 (WZWS52) (gem. Nutzung)) + subtext: "weihenstephan, ZIEL IV - Biowissenschaften" + subtext_bold: 2.34@4224 + - id: 4224.02.298 + type: room + name: 4224.02.298 (Seminarraum 53 (WZWS53)) + subtext: "weihenstephan, ZIEL IV - Biowissenschaften" + subtext_bold: 2.98@4224 + n_visible: 6 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-11.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-11.snap new file mode 100644 index 000000000..6a495868a --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-11.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'5604.00.011' should get '5604.EG.011' in 1 results" +--- +- facet: rooms + entries: + - id: 5604.EG.011 + type: room + name: "\u00195604\u0017.EG.\u0019011\u0017 (MI Hörsaal 2)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.011@5604 + - id: 5604.EG.034 + type: room + name: "\u00195604\u0017.EG.034 (Demonstrationspraktikum)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.034@5604 + - id: 5604.EG.036 + type: room + name: "\u00195604\u0017.EG.036 (Praktikumsraum-Physik)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.036@5604 + - id: 5604.EG.038 + type: room + name: "\u00195604\u0017.EG.038 (Praktikumsraum-Physik)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.038@5604 + - id: 5604.EG.015 + type: room + name: "\u00195604\u0017.EG.015 (WC-Herren)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.015@5604 + - id: 5604.EG.016A + type: room + name: "\u00195604\u0017.EG.016A (Putzraum)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.016A@5604 + - id: 5604.EG.019 + type: room + name: "\u00195604\u0017.EG.019 (WC-Damen)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.019@5604 + - id: 5604.EG.013 + type: room + name: "\u00195604\u0017.EG.013 (Abstellraum)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.013@5604 + - id: 5604.EG.016B + type: room + name: "\u00195604\u0017.EG.016B (Heizung/Brauchwassererwärmung)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.016B@5604 + - id: 5604.EG.018 + type: room + name: "\u00195604\u0017.EG.018 (Heizung/Brauchwassererwärmung)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.018@5604 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-12.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-12.snap new file mode 100644 index 000000000..8d7fb1298 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-12.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: MI Magistrale +expression: actual +info: "'5601.EG.001' should get '5601.EG.001' in 1 results # MI Magistrale" +--- +- facet: rooms + entries: + - id: 5601.EG.001 + type: room + name: "\u00195601\u0017.\u0019EG\u0017.\u0019001\u0017 (Magistrale)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.001@5601 + - id: 5601.EG.010 + type: room + name: "\u00195601\u0017.\u0019EG\u0017.010 (Pforte)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.010@5601 + - id: 5601.EG.002 + type: room + name: "\u00195601\u0017.\u0019EG\u0017.002 (Gang, Weg im Freien)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.002@5601 + - id: 5601.EG.003 + type: room + name: "\u00195601\u0017.\u0019EG\u0017.003 (Windfang)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.003@5601 + - id: 5601.EG.004 + type: room + name: "\u00195601\u0017.\u0019EG\u0017.004 (Gang, Weg im Freien)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.004@5601 + - id: 5601.EG.005 + type: room + name: "\u00195601\u0017.\u0019EG\u0017.005 (Windfang)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.005@5601 + - id: 5601.EG.008 + type: room + name: "\u00195601\u0017.\u0019EG\u0017.008 (Gang, Weg im Freien)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.008@5601 + - id: 5601.EG.009 + type: room + name: "\u00195601\u0017.\u0019EG\u0017.009 (Windfang)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.009@5601 + - id: 5601.EG.011 + type: room + name: "\u00195601\u0017.\u0019EG\u0017.011 (Windfang)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.011@5601 + - id: 5601.EG.012 + type: room + name: "\u00195601\u0017.\u0019EG\u0017.012 (Gang, Weg im Freien)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.012@5601 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-13.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-13.snap new file mode 100644 index 000000000..8e09d9c36 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-13.snap @@ -0,0 +1,65 @@ +--- +source: src/search_executor/mod.rs +description: A search for the Architects name should return the correct room +expression: actual +info: "'00.01.001' should get '5601.EG.001' in 1 results # A search for the Architects name should return the correct room" +--- +- facet: rooms + entries: + - id: 5601.EG.001 + type: room + name: "5601.EG.\u0019001\u0017 (Magistrale)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.01.001@5601 + parsed_id: "MI \u001900.01.001\u0017" + - id: 5510.EG.001 + type: room + name: "5510.EG.\u0019001\u0017 (Hörsaal)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0001@5510 + - id: 3902.EG.001 + type: room + name: "3902.EG.\u0019001\u0017 (Unterricht 2)" + subtext: "zhs-wassersportplatz-starnberg, Seglerheim" + subtext_bold: 0001@3902 + - id: 5414.EG.001 + type: room + name: "5414.EG.\u0019001\u0017 (ZEI-Seminarraum)" + subtext: "garching, Zentrum für Energie und Information (ZEI)" + subtext_bold: 0001@5414 + - id: 5433.EG.001 + type: room + name: "5433.EG.\u0019001\u0017 (Seminarraum 1)" + subtext: "garching, Entrepreneurship Research Institute" + subtext_bold: 0001@5433 + - id: 7910.EG.001 + type: room + name: "7910.EG.\u0019001\u0017 (Messkabine & Messtationen)" + subtext: Oskar-von-Miller-Turm (Meteo-Mast) + subtext_bold: 0001@7910 + - id: 0205.EG.001 + type: room + name: "0205.EG.\u0019001\u0017 (Büro)" + subtext: "stammgelände, Arcisstr. 19 (S5)" + subtext_bold: 0001@0205 + - id: 0401.EG.001 + type: room + name: "0401.EG.\u0019001\u0017 (WC-Damen)" + subtext: "stammgelände, Richard-Wagner-Str. 18 (SW1)" + subtext_bold: 0001@0401 + - id: 5116.EG.001 + type: room + name: "5116.EG.\u0019001\u0017 (Trafostation)" + subtext: "garching, Trafostation des ZNN" + subtext_bold: 0001@5116 + - id: 5125.EG.001 + type: room + name: "5125.EG.\u0019001\u0017 (BMZ)" + subtext: "garching, Laboratory for Extreme Photonics (LEX), LMU" + subtext_bold: 0001@5125 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-14.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-14.snap new file mode 100644 index 000000000..76a9a9fd2 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-14.snap @@ -0,0 +1,66 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'03.08.011' should get '5608.03.011' in 1 results" +--- +- facet: rooms + entries: + - id: 5608.03.011 + type: room + name: "5608.\u001903\u0017.\u0019011\u0017 (Seminarraum (M1/M7))" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.08.011@5608 + parsed_id: "MI \u001903.08.011\u0017" + - id: 5608.03.011A + type: room + name: "5608.\u001903\u0017.\u0019011\u0017A (Balkon)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.08.011A@5608 + parsed_id: "MI \u001903.08.011\u0017A" + - id: 8102.03.108 + type: room + name: "8102.\u001903\u0017.108 (Hörsaal)" + subtext: "garching-hochbrück, Business Campus 2" + subtext_bold: BC2 3.1.08@8102 + - id: 5608.03.033A + type: room + name: "5608.\u001903\u0017.033A (Kopierer)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.08.033A@5608 + - id: 2410.03.308 + type: room + name: "2410.\u001903\u0017.308 (WC-Damen)" + subtext: "Heßstraße 134, Munich School of Robotics and Machine Intelligence" + subtext_bold: 03.08@2410 + - id: 5608.03.015 + type: room + name: "5608.\u001903\u0017.015 (WC-Herren)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.08.015@5608 + - id: 5608.03.016 + type: room + name: "5608.\u001903\u0017.016 (Beh.-WC / Wickeltisch)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.08.016@5608 + - id: 5608.03.017A + type: room + name: "5608.\u001903\u0017.017A (Putzraum)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.08.017A@5608 + - id: 5608.03.021 + type: room + name: "5608.\u001903\u0017.021 (Büro)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.08.021@5608 + - id: 5608.03.022 + type: room + name: "5608.\u001903\u0017.022 (Besprechungsraum)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 03.08.022@5608 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-15.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-15.snap new file mode 100644 index 000000000..490782ad7 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-15.snap @@ -0,0 +1,59 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'MW 1801' should get '5508.02.801' in 1 results" +--- +- facet: rooms + entries: + - id: 5508.02.801 + type: room + name: 5508.02.801 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1801@5508 + - id: 5508.01.801A + type: room + name: 5508.01.801A (Vorbereitung) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1801a@5508 + - id: 5510.02.001 + type: room + name: "5510.02.001 (\u0019MW\u0017 2001 Rudolf-Diesel-Hörsaal)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 2001@5510 + - id: 5502.01.250 + type: room + name: 5502.01.250 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1250@5502 + - id: 5502.EG.250 + type: room + name: 5502.EG.250 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0250@5502 + n_visible: 5 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: mw + type: joined_building + name: "Maschinenwesen (\u0019MW\u0017)" + subtext: Gebäudekomplex + - id: "5506" + type: building + name: "Gebäudeteil 6, Institut für Luft- und Raumfahrt" + subtext: Gebäudeteil + - id: "5501" + type: building + name: "Gebäudeteil 1, Institut für Mechatronik" + subtext: Gebäudeteil + - id: "5502" + type: building + name: "Gebäudeteil 2, Institut für Werkstoffe und Verarbeitung" + subtext: Gebäudeteil + - id: "5504" + type: building + name: "Gebäudeteil 4, Institut für Verfahrenstechnik" + subtext: Gebäudeteil + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-16.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-16.snap new file mode 100644 index 000000000..1b0aae0c2 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-16.snap @@ -0,0 +1,59 @@ +--- +source: src/search_executor/mod.rs +description: splitting necessary +expression: actual +info: "'MW1801' should get '5508.02.801' in 1 results # splitting necessary" +--- +- facet: rooms + entries: + - id: 5508.02.801 + type: room + name: 5508.02.801 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1801@5508 + - id: 5510.02.001 + type: room + name: "5510.02.001 (\u0019MW\u0017 2001 Rudolf-Diesel-Hörsaal)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 2001@5510 + - id: 5502.01.250 + type: room + name: 5502.01.250 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1250@5502 + - id: 5502.EG.250 + type: room + name: 5502.EG.250 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0250@5502 + - id: 5503.EG.350 + type: room + name: 5503.EG.350 (Egbert-von-Hoyer-Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0350@5503 + n_visible: 5 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: mw + type: joined_building + name: "Maschinenwesen (\u0019MW\u0017)" + subtext: Gebäudekomplex + - id: "5506" + type: building + name: "Gebäudeteil 6, Institut für Luft- und Raumfahrt" + subtext: Gebäudeteil + - id: "5501" + type: building + name: "Gebäudeteil 1, Institut für Mechatronik" + subtext: Gebäudeteil + - id: "5502" + type: building + name: "Gebäudeteil 2, Institut für Werkstoffe und Verarbeitung" + subtext: Gebäudeteil + - id: "5504" + type: building + name: "Gebäudeteil 4, Institut für Verfahrenstechnik" + subtext: Gebäudeteil + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-17.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-17.snap new file mode 100644 index 000000000..e108c4aac --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-17.snap @@ -0,0 +1,59 @@ +--- +source: src/search_executor/mod.rs +description: splitting necessary +expression: actual +info: "'MW0001' should get '5510.EG.001' in 1 results # splitting necessary" +--- +- facet: rooms + entries: + - id: 5510.EG.001 + type: room + name: 5510.EG.001 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0001@5510 + - id: 5519.EG.001 + type: room + name: 5519.EG.001 (Versuchsfläche I) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0001@5519 + - id: 5510.02.001 + type: room + name: "5510.02.001 (\u0019MW\u0017 2001 Rudolf-Diesel-Hörsaal)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 2001@5510 + - id: 5502.01.250 + type: room + name: 5502.01.250 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1250@5502 + - id: 5502.EG.250 + type: room + name: 5502.EG.250 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0250@5502 + n_visible: 5 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: mw + type: joined_building + name: "Maschinenwesen (\u0019MW\u0017)" + subtext: Gebäudekomplex + - id: "5506" + type: building + name: "Gebäudeteil 6, Institut für Luft- und Raumfahrt" + subtext: Gebäudeteil + - id: "5501" + type: building + name: "Gebäudeteil 1, Institut für Mechatronik" + subtext: Gebäudeteil + - id: "5502" + type: building + name: "Gebäudeteil 2, Institut für Werkstoffe und Verarbeitung" + subtext: Gebäudeteil + - id: "5504" + type: building + name: "Gebäudeteil 4, Institut für Verfahrenstechnik" + subtext: Gebäudeteil + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-18.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-18.snap new file mode 100644 index 000000000..5a3c45025 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-18.snap @@ -0,0 +1,59 @@ +--- +source: src/search_executor/mod.rs +description: splitting necessary +expression: actual +info: "'MW2001' should get '5510.02.001' in 1 results # splitting necessary" +--- +- facet: rooms + entries: + - id: 5510.02.001 + type: room + name: "5510.02.001 (\u0019MW\u0017 \u00192001\u0017 Rudolf-Diesel-Hörsaal)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 2001@5510 + - id: 5502.01.250 + type: room + name: 5502.01.250 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1250@5502 + - id: 5502.EG.250 + type: room + name: 5502.EG.250 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0250@5502 + - id: 5503.EG.350 + type: room + name: 5503.EG.350 (Egbert-von-Hoyer-Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0350@5503 + - id: 5506.EG.608M + type: room + name: 5506.EG.608M (Otto-Lilienthal-Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0608M@5506 + n_visible: 5 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: mw + type: joined_building + name: "Maschinenwesen (\u0019MW\u0017)" + subtext: Gebäudekomplex + - id: "5506" + type: building + name: "Gebäudeteil 6, Institut für Luft- und Raumfahrt" + subtext: Gebäudeteil + - id: "5501" + type: building + name: "Gebäudeteil 1, Institut für Mechatronik" + subtext: Gebäudeteil + - id: "5502" + type: building + name: "Gebäudeteil 2, Institut für Werkstoffe und Verarbeitung" + subtext: Gebäudeteil + - id: "5504" + type: building + name: "Gebäudeteil 4, Institut für Verfahrenstechnik" + subtext: Gebäudeteil + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-19.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-19.snap new file mode 100644 index 000000000..a119f7425 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-19.snap @@ -0,0 +1,66 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'1801 maschinen' should get '5508.02.801' in 1 results" +--- +- facet: rooms + entries: + - id: 5508.02.801 + type: room + name: 5508.02.801 (Hörsaal) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1801@5508 + parsed_id: "MW \u00191801\u0017" + - id: 0508.01.801 + type: room + name: 0508.01.801 (Wasch.-/Putzraum) + subtext: "stammgelände, Heizkraftwerk (Z8)" + subtext_bold: 1801@0508 + parsed_id: "\u00191801\u0017 Heizkraftwerk (Z8)" + - id: 0106.U1.801 + type: room + name: 0106.U1.801 (Archiv) + subtext: "stammgelände, Materialprüfamt (N6)" + subtext_bold: N-1801@0106 + - id: 2332.01.217 + type: room + name: "2332.01.217 ((32.\u00191\u0017.\u0019801\u0017) Büro)" + subtext: "campus-im-olympiapark-sz, CiO/SG Institute Ost" + subtext_bold: 01.2332.217@2332 + - id: 5132.U1.801 + type: room + name: 5132.U1.801 (Technik) + subtext: "garching, Boltzmannstr. 12" + subtext_bold: "-1.801@5132" + - id: 5115.01.801 + type: room + name: 5115.01.801 (Treppe Nord) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 1.801@5115 + - id: 5128.U1.801 + type: room + name: 5128.U1.801 (Aufzug / Unterfahrt) + subtext: "garching, Am Coulombwall 3A" + subtext_bold: "-1.801@5128" + - id: 5301.01.801 + type: room + name: 5301.01.801 (Treppenhaus) + subtext: "garching, Institute for Advanced Study (IAS)" + subtext_bold: 1.801@5301 + - id: 5212.01.801 + type: room + name: 5212.01.801 (Treppenhaus West) + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.1.801@5212 + - id: 5212.01.801L + type: room + name: 5212.01.801L (Aufzug) + subtext: "garching, RCM Radiochemie München" + subtext_bold: L.1.801@5212 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-2.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-2.snap new file mode 100644 index 000000000..8a850d664 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-2.snap @@ -0,0 +1,59 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'wzw' should get 'wzw' in 1 results" +--- +- facet: sites_buildings + entries: + - id: wzw + type: campus + name: Campus Weihenstephan (Freising) + subtext: Campus + - id: wzw-extern + type: area + name: School of of Life Sciences Außenstellen + subtext: Gebiet / Gruppe von Gebäuden + - id: wzw-berg + type: area + name: Gebiet 4100 Berg + subtext: Gebiet / Gruppe von Gebäuden + - id: wzw-mitte + type: area + name: Gebiet 4200 Mitte + subtext: Gebiet / Gruppe von Gebäuden + - id: wzw-nord + type: area + name: Gebiet 4300 Nord / Hochfeld + subtext: Gebiet / Gruppe von Gebäuden + n_visible: 5 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 4101.01.129 + type: room + name: "4101.01.129 (Hörsaal 6 (\u0019WZW\u0017H06))" + subtext: "weihenstephan, Verwaltung / BLQ Brau- und Lebensmittelqualität" + subtext_bold: 129@4101 + - id: 4102.EG.034 + type: room + name: "4102.EG.034 (Hörsaal 1 (\u0019WZW\u0017H01))" + subtext: "weihenstephan, Hörsaal- und Dekanatsgebäude" + subtext_bold: E-34@4102 + - id: 4102.EG.036 + type: room + name: "4102.EG.036 (Hörsaal 2 (\u0019WZW\u0017H02))" + subtext: "weihenstephan, Hörsaal- und Dekanatsgebäude" + subtext_bold: E-35@4102 + - id: 4108.EG.105 + type: room + name: "4108.EG.105 (Hörsaal 9 (\u0019WZW\u0017H09))" + subtext: "weihenstephan, BLQ Lebensmittelsicherheit" + subtext_bold: 105@4108 + - id: 4108.EG.106 + type: room + name: "4108.EG.106 (Hörsaal 8 (\u0019WZW\u0017H08))" + subtext: "weihenstephan, BLQ Lebensmittelsicherheit" + subtext_bold: 106@4108 + n_visible: 5 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-20.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-20.snap new file mode 100644 index 000000000..dc0981c4a --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-20.snap @@ -0,0 +1,63 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'Raum 0337 mw' should get '5503.EG.337' in 1 results" +--- +- facet: rooms + entries: + - id: 5503.EG.337 + type: room + name: 5503.EG.337 (Seminarraum) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0337@5503 + - id: 0503.EG.337 + type: room + name: 0503.EG.337 (Büro) + subtext: "stammgelände, Thierschbau (Z3)" + subtext_bold: 0337@0503 + - id: 2334.EG.128 + type: room + name: "2334.EG.128 ((34.\u00190\u0017.\u0019337\u0017) Büro)" + subtext: "campus-im-olympiapark-sz, CiO/SG Institute West, Bibliothek" + subtext_bold: 00.2334.128@2334 + - id: 0509.EG.980 + type: room + name: "0509.EG.980 (Audimax, Werner-von-Siemens-Hörsaal)" + subtext: "stammgelände, Wienandsbau (Z9)" + subtext_bold: 0980@0509 + - id: 8120.EG.001 + type: room + name: 8120.EG.001 (Hörsaal im Galileo) + subtext: "garching, Galileo" + subtext_bold: Hörsaal@8120 + - id: 8120.01.101 + type: room + name: 8120.01.101 (Audimax im Galileo) + subtext: "garching, Galileo" + subtext_bold: Audimax@8120 + - id: 0101.02.179 + type: room + name: 0101.02.179 (Wilhelm-Nusselt-Hörsaal) + subtext: "stammgelände, U-Trakt (N1)" + subtext_bold: N1179@0101 + - id: 0101.02.189 + type: room + name: 0101.02.189 (Hans-Piloty-Hörsaal) + subtext: "stammgelände, U-Trakt (N1)" + subtext_bold: N1189@0101 + - id: 0101.02.190 + type: room + name: 0101.02.190 (Hans-Heinrich-Meinke-Hörsaal) + subtext: "stammgelände, U-Trakt (N1)" + subtext_bold: N1190@0101 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: "0109" + type: building + name: "Reflexionsarmer \u0019Raum\u0017 (N9)" + subtext: Gebäude + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-21.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-21.snap new file mode 100644 index 000000000..65ab731ff --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-21.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'pyhsik hs 2' should get '5101.EG.502' in 1 results" +--- +- facet: rooms + entries: + - id: 5101.EG.502 + type: room + name: "5101.EG.502 (\u0019Physik\u0017 \u0019Hörsaal\u0017 \u00192\u0017)" + subtext: "garching, Physik I" + subtext_bold: 2502@5101 + - id: 5101.EG.503 + type: room + name: "5101.EG.503 (\u0019Physik\u0017 \u0019Hörsaal\u0017 3)" + subtext: "garching, Physik I" + subtext_bold: 2503@5101 + - id: 5101.EG.501 + type: room + name: "5101.EG.501 (Rudolf-Mößbauer-\u0019Hörsaal\u0017)" + subtext: "garching, Physik I" + subtext_bold: 2501@5101 + - id: 0102.U1.216D + type: room + name: "0102.U1.\u00192\u001716D (Versuchsraum \u0019HS\u0017/NS)" + subtext: "stammgelände, Hochvolthaus (N2)" + subtext_bold: N-1216D@0102 + - id: 0102.U1.216E + type: room + name: "0102.U1.\u00192\u001716E (Versuchsraum \u0019HS\u0017/NS)" + subtext: "stammgelände, Hochvolthaus (N2)" + subtext_bold: N-1216E@0102 + - id: 0102.U1.216F + type: room + name: "0102.U1.\u00192\u001716F (Versuchsraum \u0019HS\u0017/NS)" + subtext: "stammgelände, Hochvolthaus (N2)" + subtext_bold: N-1216F@0102 + - id: 0102.U1.216G + type: room + name: "0102.U1.\u00192\u001716G (Versuchsraum \u0019HS\u0017/NS)" + subtext: "stammgelände, Hochvolthaus (N2)" + subtext_bold: N-1216G@0102 + - id: 5101.EG.501A + type: room + name: "5101.EG.501A (Projektorraum \u0019HS\u0017 PH 1)" + subtext: "garching, Physik I" + subtext_bold: 2501A@5101 + - id: 0502.01.202 + type: room + name: "0502.01.\u00192\u001702 (Vorbereitung Carl von Linde-\u0019Hörsaal\u0017)" + subtext: "stammgelände, Zentralgebäude 2 (Z2)" + subtext_bold: 1202@0502 + - id: 5123.EG.019 + type: room + name: "5123.EG.019 (LMU \u0019Hörsaal\u0017 im \u0019Physik\u0017 Werkstattgebäude)" + subtext: "garching, LMU Physik Werkstattgebäude" + subtext_bold: 019@5123 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-22.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-22.snap new file mode 100644 index 000000000..17e7053ea --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-22.snap @@ -0,0 +1,19 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'mössbauer' should get '5101.EG.501' in 1 results" +--- +- facet: rooms + entries: + - id: 5101.EG.501 + type: room + name: "5101.EG.501 (Rudolf-\u0019Mößbauer\u0017-Hörsaal)" + subtext: "garching, Physik I" + subtext_bold: 2501@5101 + n_visible: 1 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-23.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-23.snap new file mode 100644 index 000000000..d4f2433a1 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-23.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'342 Physik' should get '5101.EG.342' in 1 results" +--- +- facet: rooms + entries: + - id: 5101.EG.342 + type: room + name: "5101.EG.\u0019342\u0017 (\u0019Physik\u0017labor)" + subtext: "garching, Physik I" + subtext_bold: 2342@5101 + - id: 5101.01.342 + type: room + name: "5101.01.\u0019342\u0017 (Sitzungs-, Konferenzraum)" + subtext: "garching, Physik I" + subtext_bold: 3342@5101 + - id: 4213.01.342 + type: room + name: "4213.01.\u0019342\u0017 (Labor (gem. Nutzung 1124302010;1110064600))" + subtext: "weihenstephan, Lebensmitteltechnikum" + subtext_bold: O42@4213 + - id: 4213.EG.342 + type: room + name: "4213.EG.\u0019342\u0017 (Labor)" + subtext: "weihenstephan, Lebensmitteltechnikum" + subtext_bold: E42@4213 + - id: 4317.03.342 + type: room + name: "4317.03.\u0019342\u0017 (Labor)" + subtext: "weihenstephan, Tierwissenschaften" + subtext_bold: 3.42@4317 + - id: 2910.03.342 + type: room + name: "2910.03.\u0019342\u0017 (Teeküche)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.342@2910 + - id: 0503.01.342 + type: room + name: "0503.01.\u0019342\u0017 (Büro)" + subtext: "stammgelände, Thierschbau (Z3)" + subtext_bold: 1342@0503 + - id: 0503.03.342 + type: room + name: "0503.03.\u0019342\u0017 (Büro)" + subtext: "stammgelände, Thierschbau (Z3)" + subtext_bold: 3342@0503 + - id: 0503.EG.342 + type: room + name: "0503.EG.\u0019342\u0017 (Sekretariat 2)" + subtext: "stammgelände, Thierschbau (Z3)" + subtext_bold: 0342@0503 + - id: 2334.01.342 + type: room + name: "2334.01.\u0019342\u0017 ((34.1.406) WC-Herren)" + subtext: "campus-im-olympiapark-sz, CiO/SG Institute West, Bibliothek" + subtext_bold: 01.2334.342@2334 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-24.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-24.snap new file mode 100644 index 000000000..0aba44052 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-24.snap @@ -0,0 +1,66 @@ +--- +source: src/search_executor/mod.rs +description: "lecture hall, should be preferred over other rooms" +expression: actual +info: "'2503' should get '5101.EG.503' in 1 results # lecture hall, should be preferred over other rooms" +--- +- facet: rooms + entries: + - id: 5101.EG.503 + type: room + name: 5101.EG.503 (Physik Hörsaal 3) + subtext: "garching, Physik I" + subtext_bold: 2503@5101 + parsed_id: "PH \u00192503\u0017" + - id: 0505.02.503 + type: room + name: 0505.02.503 (Büro) + subtext: "stammgelände, Wirtschaftswissenschaften (Z5)" + subtext_bold: 2503@0505 + parsed_id: "\u00192503\u0017 Wirtsch…aften (Z5)" + - id: 5505.02.503A + type: room + name: 5505.02.503A (Büro) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 2503A@5505 + parsed_id: "MW \u00192503\u0017A" + - id: 5505.02.503M + type: room + name: 5505.02.503M (WC-Vorraum Herren) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 2503M@5505 + parsed_id: "MW \u00192503\u0017M" + - id: 5505.02.503N + type: room + name: 5505.02.503N (WC-Vorraum Damen) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 2503N@5505 + parsed_id: "MW \u00192503\u0017N" + - id: 5505.02.503P + type: room + name: 5505.02.503P (WC-Herren) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 2503P@5505 + parsed_id: "MW \u00192503\u0017P" + - id: 5505.02.503Q + type: room + name: 5505.02.503Q (WC-Damen) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 2503Q@5505 + parsed_id: "MW \u00192503\u0017Q" + - id: 5115.02.503 + type: room + name: 5115.02.503 (Elt.) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 2.503@5115 + - id: 5117.EG.503 + type: room + name: 5117.EG.503 (Fluchttreppe N-W) + subtext: "garching, Paula-Hahn-Weinheimerstr. 1" + subtext_bold: 2.503@5117 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-25.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-25.snap new file mode 100644 index 000000000..0d9aeea46 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-25.snap @@ -0,0 +1,59 @@ +--- +source: src/search_executor/mod.rs +description: "seminar room, should be preferred over other rooms" +expression: actual +info: "'1116' should get '5111.01.116' in 1 results # seminar room, should be preferred over other rooms" +--- +- facet: rooms + entries: + - id: 5111.01.116 + type: room + name: 5111.01.116 (Seminarraum) + subtext: "garching, Siedlungswasserwirtschaft" + subtext_bold: 1116@5111 + parsed_id: "\u00191116\u0017 Siedlungswasserwirtschaft" + - id: 0401.01.116 + type: room + name: 0401.01.116 (Büro) + subtext: "stammgelände, Richard-Wagner-Str. 18 (SW1)" + subtext_bold: 1116@0401 + parsed_id: "\u00191116\u0017 Richard…. 18 (SW1)" + - id: 5111.U1.116 + type: room + name: 5111.U1.116 (Glas u. brennbare Stoffe) + subtext: "garching, Siedlungswasserwirtschaft" + subtext_bold: "-1116@5111" + - id: 5401.EG.116A + type: room + name: 5401.EG.116A (Heizraum) + subtext: "garching, Chemie" + subtext_bold: 11160@5401 + parsed_id: "CH \u00191116\u00170" + - id: 5401.EG.116B + type: room + name: 5401.EG.116B (Flur) + subtext: "garching, Chemie" + subtext_bold: 11165@5401 + parsed_id: "CH \u00191116\u00175" + - id: 5401.EG.116C + type: room + name: 5401.EG.116C (Flur) + subtext: "garching, Chemie" + subtext_bold: 11166@5401 + parsed_id: "CH \u00191116\u00176" + - id: 2332.EG.224 + type: room + name: "2332.EG.224 ((32.\u00191\u0017.\u0019116\u0017) Sekretariat)" + subtext: "campus-im-olympiapark-sz, CiO/SG Institute Ost" + subtext_bold: 00.2332.224@2332 + - id: 5701.01.016 + type: room + name: 5701.01.016 (Oberassistent) + subtext: "garching, MIBE" + subtext_bold: 1.116@5701 + n_visible: 8 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-26.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-26.snap new file mode 100644 index 000000000..3c4e8ec18 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-26.snap @@ -0,0 +1,60 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'C.3202' should get '5140.01.202' in 1 results" +--- +- facet: rooms + entries: + - id: 5140.01.202 + type: room + name: 5140.01.202 (Tutorraum) + subtext: "garching, Physik I Container" + subtext_bold: C.3202@5140 + parsed_id: "\u0019C.3202\u0017 Physik I Container" + - id: 1551.01.051 + type: room + name: "1551.01.051 (Hörsaal \u0019C\u0017)" + subtext: "mri, A1-Hörsäle, Mensa (Bau 551)" + subtext_bold: 51.1.51@1551 + - id: 1551.EG.051 + type: room + name: "1551.EG.051 (Hörsaal \u0019C\u0017)" + subtext: "mri, A1-Hörsäle, Mensa (Bau 551)" + subtext_bold: 51.0.51@1551 + - id: 1910.EG.050C + type: room + name: 1910.EG.050C (Hörsaal) + subtext: "campus-heilbronn, Bildungscampus C, Weipertstr. 8-10" + subtext_bold: C.0.50@1910 + - id: 5140.01.201 + type: room + name: 5140.01.201 (Tutorraum) + subtext: "garching, Physik I Container" + subtext_bold: C.3201@5140 + n_visible: 5 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: "2940" + type: building + name: "Campus \u0019C\u0017, Georg-Brauchle-Ring 56/58" + subtext: Gebäudeteil + - id: "2911" + type: building + name: "Richard-Wagner-Str. 3 / Haus \u0019C\u0017, TUM Sprachenzentrum" + subtext: Gebäude + - id: "1910" + type: building + name: "Bildungscampus \u0019C\u0017, Weipertstr. 8-10" + subtext: Gebäude + - id: 1555c + type: building + name: "Bau 555 Gebäudeteil \u0019C\u0017" + subtext: Gebäudeteil + - id: "9376" + type: building + name: "Airbus Standort 76.\u0019C\u0017" + subtext: Gebäude + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-27.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-27.snap new file mode 100644 index 000000000..3ec18842a --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-27.snap @@ -0,0 +1,70 @@ +--- +source: src/search_executor/mod.rs +description: Not sure about target here +expression: actual +info: "'1010 znn' should get '5115.01.010' in 1 results # Not sure about target here" +--- +- facet: rooms + entries: + - id: 5115.01.010 + type: room + name: 5115.01.010 (Elt. Transport) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 1.010@5115 + - id: 5510.01.010 + type: room + name: 5510.01.010 (Seminarraum) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1010@5510 + parsed_id: "MW \u00191010\u0017" + - id: 0510.01.010 + type: room + name: 0510.01.010 (Küche) + subtext: "stammgelände, Verwaltungsbau (Z10)" + subtext_bold: 1010@0510 + parsed_id: "\u00191010\u0017 Verwaltungsbau (Z10)" + - id: 2906.01.010 + type: room + name: 2906.01.010 (Büro) + subtext: Karlstraße 45/47 + subtext_bold: 1010@2906 + parsed_id: "\u00191010\u0017 Karlstraße 45/47" + - id: 5433.01.010 + type: room + name: 5433.01.010 (Büro) + subtext: "garching, Entrepreneurship Research Institute" + subtext_bold: 1010@5433 + parsed_id: "\u00191010\u0017 Entrepr… Institute" + - id: 0202.U1.010 + type: room + name: 0202.U1.010 (Lager) + subtext: "stammgelände, Gabelsbergerstr. 39 (S2)" + subtext_bold: "-1010@0202" + - id: 0401.U1.010 + type: room + name: 0401.U1.010 (Archiv) + subtext: "stammgelände, Richard-Wagner-Str. 18 (SW1)" + subtext_bold: "-1010@0401" + - id: 2906.U1.010 + type: room + name: 2906.U1.010 (Trafostation) + subtext: Karlstraße 45/47 + subtext_bold: "-1010@2906" + - id: 5413.EG.010 + type: room + name: 5413.EG.010 (Hausanschluss) + subtext: "garching, BNMRZ Bayerisches NMR-Zentrum" + subtext_bold: 1010@5413 + parsed_id: "\u00191010\u0017 BNMRZ B…MR-Zentrum" + - id: 5414.01.010 + type: room + name: 5414.01.010 (Lager) + subtext: "garching, Zentrum für Energie und Information (ZEI)" + subtext_bold: 1010@5414 + parsed_id: "\u00191010\u0017 Zentrum…tion (ZEI)" + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-28.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-28.snap new file mode 100644 index 000000000..546adb28b --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-28.snap @@ -0,0 +1,30 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'0092@5433' should get '5433.EG.092' in 1 results" +--- +- facet: rooms + entries: + - id: 5433.EG.092 + type: room + name: "\u00195433\u0017.EG.092 (Flur/Eingang)" + subtext: "garching, Entrepreneurship Research Institute" + subtext_bold: 0092@5433 + parsed_id: "\u00190092@5433\u0017" + - id: 5622.EG.092 + type: room + name: 5622.EG.092 (Sportflächen Garching) + subtext: "garching, Sportanlage Garching / Dusch Container" + subtext_bold: 0092@5622 + - id: 5532.EG.092 + type: room + name: 5532.EG.092 (ELT.-Schacht) + subtext: "garching, StudiTUM" + subtext_bold: 0.092@5532 + n_visible: 3 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-29.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-29.snap new file mode 100644 index 000000000..39147bf52 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-29.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'0026m@5510' should get '5510.EG.026M' in 1 results" +--- +- facet: rooms + entries: + - id: 5510.EG.026M + type: room + name: "\u00195510\u0017.EG.\u0019026M\u0017 (School Office Finanzen)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: MW 0026M@5510 + - id: 5510.EG.006M + type: room + name: "\u00195510\u0017.EG.\u0019006M\u0017 (WC-Herren)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0006M@5510 + - id: 5510.EG.026A + type: room + name: "\u00195510\u0017.EG.026A (Leitung Study & Teaching, Studienfachberatung)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0026A@5510 + - id: 5510.EG.026C + type: room + name: "\u00195510\u0017.EG.026C (IKOM-Besprechungsraum)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0026C@5510 + - id: 5510.EG.026B + type: room + name: "\u00195510\u0017.EG.026B (Studienbüro)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0026B@5510 + - id: 5510.EG.026N + type: room + name: "\u00195510\u0017.EG.026N (Study and Teaching Qualitätsmanagement)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: MW 0026N@5510 + - id: 5510.EG.029M + type: room + name: "\u00195510\u0017.EG.029M (Werkstatt)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0029M@5510 + - id: 5510.EG.028M + type: room + name: "\u00195510\u0017.EG.028M (Flur)" + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0028M@5510 + - id: 5531.EG.026 + type: room + name: 5531.EG.026 (Beh.-WC / Personal) + subtext: "garching, Ingeborg Ortner-Kinderhaus" + subtext_bold: 0026@5531 + - id: 5501.EG.126M + type: room + name: 5501.EG.126M (Elektroverteiler) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 0126M@5501 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-3.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-3.snap new file mode 100644 index 000000000..9119cde25 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-3.snap @@ -0,0 +1,63 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'5301' should get '5301' in 1 results" +--- +- facet: sites_buildings + entries: + - id: "5301" + type: building + name: Institute for Advanced Study (IAS) + subtext: Gebäude + n_visible: 1 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5301.EG.001 + type: room + name: "\u00195301\u0017.EG.001 (Auditorium)" + subtext: "garching, Institute for Advanced Study (IAS)" + subtext_bold: 0.001@5301 + - id: 5301.02.022 + type: room + name: "\u00195301\u0017.02.022 (Zeitschriften/Lesesaal)" + subtext: "garching, Institute for Advanced Study (IAS)" + subtext_bold: 2.022@5301 + - id: 5301.01.033 + type: room + name: "\u00195301\u0017.01.033 (Drucker)" + subtext: "garching, Institute for Advanced Study (IAS)" + subtext_bold: 1.033@5301 + - id: 5301.02.033 + type: room + name: "\u00195301\u0017.02.033 (Drucker)" + subtext: "garching, Institute for Advanced Study (IAS)" + subtext_bold: 2.033@5301 + - id: 5301.03.033 + type: room + name: "\u00195301\u0017.03.033 (Drucker)" + subtext: "garching, Institute for Advanced Study (IAS)" + subtext_bold: 3.033@5301 + - id: 5301.01.001 + type: room + name: "\u00195301\u0017.01.001 (Großraumbüro)" + subtext: "garching, Institute for Advanced Study (IAS)" + subtext_bold: 1.001@5301 + - id: 5301.01.004 + type: room + name: "\u00195301\u0017.01.004 (Büro)" + subtext: "garching, Institute for Advanced Study (IAS)" + subtext_bold: 1.004@5301 + - id: 5301.01.005 + type: room + name: "\u00195301\u0017.01.005 (Büro)" + subtext: "garching, Institute for Advanced Study (IAS)" + subtext_bold: 1.005@5301 + - id: 5301.01.006 + type: room + name: "\u00195301\u0017.01.006 (Büro)" + subtext: "garching, Institute for Advanced Study (IAS)" + subtext_bold: 1.006@5301 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-30.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-30.snap new file mode 100644 index 000000000..6f0fa2042 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-30.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'019 lmu' should get '5123.EG.019' in 1 results" +--- +- facet: rooms + entries: + - id: 5123.EG.019 + type: room + name: "5123.EG.\u0019019\u0017 (\u0019LMU\u0017 Hörsaal im Physik Werkstattgebäude)" + subtext: "garching, LMU Physik Werkstattgebäude" + subtext_bold: 019@5123 + - id: 5109.EG.019 + type: room + name: "5109.EG.\u0019019\u0017 (Kernphysiklabor)" + subtext: "garching, LMU Physik, Munich Center for Advanced Photonics (MAP)" + subtext_bold: 019@5109 + - id: 5120.EG.019 + type: room + name: "5120.EG.\u0019019\u0017 (Elektrolabor)" + subtext: "garching, Beschleuniger" + subtext_bold: 019@5120 + - id: 5109.01.019 + type: room + name: "5109.01.\u0019019\u0017 (Büro)" + subtext: "garching, LMU Physik, Munich Center for Advanced Photonics (MAP)" + subtext_bold: 019@5109 + - id: 5109.03.019 + type: room + name: "5109.03.\u0019019\u0017 (Büro)" + subtext: "garching, LMU Physik, Munich Center for Advanced Photonics (MAP)" + subtext_bold: 019@5109 + - id: 5123.U1.019 + type: room + name: "5123.U1.\u0019019\u0017 (Abwasseraufbereitung/-beseitigung)" + subtext: "garching, LMU Physik Werkstattgebäude" + subtext_bold: 019@5123 + - id: 8111.EG.019 + type: room + name: "8111.EG.\u0019019\u0017 (Praktikumsraum)" + subtext: "garching-hochbrück, Schleißheimerstr. 90a" + subtext_bold: 0.019@8111 + - id: 1548.01.019 + type: room + name: "1548.01.\u0019019\u0017 (Seminarraum)" + subtext: "mri, Schneckenburgerstr. 8, GSF-Container (\"Schneckenbunker\"), Virologie (Bau 548)" + subtext_bold: 48.1.19@1548 + - id: 1713.U2.019 + type: room + name: "1713.U2.\u0019019\u0017 (Intensiv)" + subtext: "mri, Nigerstr. 3, Student Office (Bau 713)" + subtext_bold: 713.02.19@1713 + - id: 4220.01.019 + type: room + name: "4220.01.\u0019019\u0017 (Gruppenarbeitsraum)" + subtext: "weihenstephan, Teilbibliothek Weihenstephan, Pressestelle Datenverarbeitung" + subtext_bold: OG R 19@4220 + n_visible: 10 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-31.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-31.snap new file mode 100644 index 000000000..2183c12f5 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-31.snap @@ -0,0 +1,63 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'audimax' should get '0509.EG.980' in 1 results" +--- +- facet: rooms + entries: + - id: 0509.EG.980 + type: room + name: "0509.EG.980 (\u0019Audimax\u0017, Werner-von-Siemens-Hörsaal)" + subtext: "stammgelände, Wienandsbau (Z9)" + subtext_bold: 0980@0509 + - id: 8120.01.101 + type: room + name: "8120.01.101 (\u0019Audimax\u0017 im Galileo)" + subtext: "garching, Galileo" + subtext_bold: Audimax@8120 + - id: 0509.02.986 + type: room + name: "0509.02.986 (\u0019Audimax\u0017 Galerie)" + subtext: "stammgelände, Wienandsbau (Z9)" + subtext_bold: 1986@0509 + - id: 0509.02.903 + type: room + name: 0509.02.903 (Übung-DV) + subtext: "stammgelände, Wienandsbau (Z9)" + subtext_bold: 1903@0509 + - id: 0509.02.919 + type: room + name: 0509.02.919 (Studentenarb. m. DV) + subtext: "stammgelände, Wienandsbau (Z9)" + subtext_bold: 1919@0509 + - id: 0509.02.922 + type: room + name: 0509.02.922 (Studentenarb. m. DV (HKW)) + subtext: "stammgelände, Wienandsbau (Z9)" + subtext_bold: 1922@0509 + - id: 0509.02.977 + type: room + name: 0509.02.977 (Seminarraum) + subtext: "stammgelände, Wienandsbau (Z9)" + subtext_bold: 1977@0509 + - id: 0509.03.902 + type: room + name: 0509.03.902 (Studentenarb. m. DV) + subtext: "stammgelände, Wienandsbau (Z9)" + subtext_bold: 2902@0509 + - id: 0509.03.903 + type: room + name: 0509.03.903 (Studentenarb. m. DV) + subtext: "stammgelände, Wienandsbau (Z9)" + subtext_bold: 2903@0509 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: "0509" + type: building + name: "Wienandsbau, E-Technik / \u0019Audimax\u0017 (Z9)" + subtext: Gebäude + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-32.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-32.snap new file mode 100644 index 000000000..99182cd23 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-32.snap @@ -0,0 +1,47 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'1229 seminarraum' should get '0502.01.229' in 1 results" +--- +- facet: rooms + entries: + - id: 0502.01.229 + type: room + name: "0502.01.229 (\u0019Seminarraum\u0017)" + subtext: "stammgelände, Zentralgebäude 2 (Z2)" + subtext_bold: 1229@0502 + parsed_id: "\u00191229\u0017 Zentralgebäude 2 (Z2)" + - id: 5101.U1.229 + type: room + name: 5101.U1.229 (Büro) + subtext: "garching, Physik I" + subtext_bold: 1229@5101 + parsed_id: "PH \u00191229\u0017" + - id: 5502.01.229 + type: room + name: 5502.01.229 (Büro) + subtext: "garching, Maschinenwesen (MW)" + subtext_bold: 1229@5502 + parsed_id: "MW \u00191229\u0017" + - id: 0502.U1.229 + type: room + name: 0502.U1.229 (Werkstatt) + subtext: "stammgelände, Zentralgebäude 2 (Z2)" + subtext_bold: "-1229@0502" + - id: 0102.U1.229 + type: room + name: 0102.U1.229 (Stromversorgung) + subtext: "stammgelände, Hochvolthaus (N2)" + subtext_bold: N-1229@0102 + - id: 2334.01.224 + type: room + name: "2334.01.224 ((34.\u00191\u0017.\u0019229\u0017) Hilfskraft)" + subtext: "campus-im-olympiapark-sz, CiO/SG Institute West, Bibliothek" + subtext_bold: 01.2334.224@2334 + n_visible: 6 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: [] + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-33.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-33.snap new file mode 100644 index 000000000..eefeeb321 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-33.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: "H.003 is the correct room, but people have problems remembering how many zeroes are in the room number" +expression: actual +info: "'H.003' should get '2910.EG.003' in 1 results # H.003 is the correct room, but people have problems remembering how many zeroes are in the room number" +--- +- facet: rooms + entries: + - id: 2910.EG.003 + type: room + name: "2910.EG.\u0019003\u0017 (Seminarraum)" + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.003@2910 + parsed_id: "\u0019H.003\u0017 RiWa 1 (HfP/GOV)" + - id: 5212.EG.003 + type: room + name: "5212.EG.\u0019003\u0017 (Post/Annahme)" + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.0.003@5212 + - id: 5212.U1.003 + type: room + name: "5212.U1.\u0019003\u0017 (Kälte)" + subtext: "garching, RCM Radiochemie München" + subtext_bold: H.-1.003@5212 + - id: 2910.01.101 + type: room + name: 2910.01.101 (Gruppenarbeitsraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.101@2910 + - id: 2910.01.102 + type: room + name: 2910.01.102 (Gruppenarbeitsraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.102@2910 + - id: 2910.02.202 + type: room + name: 2910.02.202 (Seminarraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.202@2910 + - id: 2910.02.204 + type: room + name: 2910.02.204 (Seminarraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.204@2910 + - id: 2910.02.206 + type: room + name: 2910.02.206 (Seminarraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.206@2910 + - id: 2910.EG.001 + type: room + name: 2910.EG.001 (Seminarraum) + subtext: "stammgelände, RiWa 1 (HfP/GOV)" + subtext_bold: H.001@2910 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: "2910" + type: building + name: "Richard-Wagner-Str. 1 / Haus B + Haus \u0019H\u0017, Hochschule für Politik (HfP)/ Department of Governance (GOV)" + subtext: Gebäude + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-34.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-34.snap new file mode 100644 index 000000000..628297a7c --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-34.snap @@ -0,0 +1,60 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'MI HS 3' should get '5606.EG.011' in 1 results" +--- +- facet: rooms + entries: + - id: 5606.EG.011 + type: room + name: "5606.EG.011 (\u0019MI\u0017 \u0019Hörsaal\u0017 \u00193\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.06.011@5606 + - id: 5602.EG.001 + type: room + name: "5602.EG.001 (\u0019MI\u0017 \u0019HS\u0017 1, Friedrich L. Bauer \u0019Hörsaal\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.02.001@5602 + - id: 5604.EG.011 + type: room + name: "5604.EG.011 (\u0019MI\u0017 \u0019Hörsaal\u0017 2)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.011@5604 + - id: 5602.EG.002 + type: room + name: "5602.EG.002 (\u0019MI\u0017 \u0019Hörsaal\u0017 Regieraum)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.02.002@5602 + - id: 5602.U1.001 + type: room + name: 5602.U1.001 (Technikraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: "-1.02.001@5602" + - id: 5602.U1.004 + type: room + name: 5602.U1.004 (Treppe im Freien) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: "-1.02.004@5602" + n_visible: 6 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: "5602" + type: building + name: "\u0019Hörsaal\u0017 1 (BT02)" + subtext: Gebäudeteil + - id: mi + type: joined_building + name: "Fakultät Mathematik & Informatik (FMI oder \u0019MI\u0017)" + subtext: Gebäudekomplex + - id: "5605" + type: building + name: Finger 05 (BT05) + subtext: Gebäudeteil + - id: "5606" + type: building + name: Finger 06 (BT06) + subtext: Gebäudeteil + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-35.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-35.snap new file mode 100644 index 000000000..e3b15feab --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-35.snap @@ -0,0 +1,64 @@ +--- +source: src/search_executor/mod.rs +description: Architects names should be matchable literally +expression: actual +info: "'N-1406' should get '0104.U1.406' in 1 results # Architects names should be matchable literally" +--- +- facet: rooms + entries: + - id: 0104.U1.406 + type: room + name: 0104.U1.406 (Physikal. Versuchslabor) + subtext: "stammgelände, E-Technik Elektrophysik (N4)" + subtext_bold: N-1406@0104 + parsed_id: "\u0019N-1406\u0017 E-Techn…hysik (N4)" + - id: 0104.01.406 + type: room + name: 0104.01.406 (Studentenarb. m. DV) + subtext: "stammgelände, E-Technik Elektrophysik (N4)" + subtext_bold: N1406@0104 + - id: 0103.U1.311 + type: room + name: 0103.U1.311 (Praktikum/Umbau) + subtext: "stammgelände, E-Technik El. Maschinen / Geräte (N3)" + subtext_bold: N-1311@0103 + - id: 0108.U1.806A + type: room + name: 0108.U1.806A (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1806A@0108 + - id: 0108.U1.806B + type: room + name: 0108.U1.806B (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1806B@0108 + - id: 0108.U1.825 + type: room + name: 0108.U1.825 (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1825@0108 + - id: 0108.U1.825A + type: room + name: 0108.U1.825A (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1825A@0108 + - id: 9201.EG.005 + type: room + name: 9201.EG.005 (Seminarraum 2) + subtext: TUM FZ Friedrich N. Schwarz Berchtesgaden + subtext_bold: EG-05@9201 + - id: 9201.EG.006 + type: room + name: 9201.EG.006 (Seminarraum 1) + subtext: TUM FZ Friedrich N. Schwarz Berchtesgaden + subtext_bold: EG-06@9201 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: "9201" + type: building + name: "TUM FZ Friedrich \u0019N\u0017. Schwarz Berchtesgaden" + subtext: Gebäude + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-36.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-36.snap new file mode 100644 index 000000000..df496e5dd --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-36.snap @@ -0,0 +1,60 @@ +--- +source: src/search_executor/mod.rs +description: "This should match this Lecture hall and not the HS 1, just because both are in the Bolzmanstr. *3* 4 is the best case." +expression: actual +info: "'MI HS3' should get '5606.EG.011' in 1 results # This should match this Lecture hall and not the HS 1, just because both are in the Bolzmanstr. *3* 4 is the best case." +--- +- facet: rooms + entries: + - id: 5606.EG.011 + type: room + name: "5606.EG.011 (\u0019MI\u0017 \u0019Hörsaal\u0017 \u00193\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.06.011@5606 + - id: 5602.EG.001 + type: room + name: "5602.EG.001 (\u0019MI\u0017 \u0019HS\u0017 1, Friedrich L. Bauer \u0019Hörsaal\u0017)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.02.001@5602 + - id: 5604.EG.011 + type: room + name: "5604.EG.011 (\u0019MI\u0017 \u0019Hörsaal\u0017 2)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.04.011@5604 + - id: 5602.EG.002 + type: room + name: "5602.EG.002 (\u0019MI\u0017 \u0019Hörsaal\u0017 Regieraum)" + subtext: "garching, Mathe/Info (MI)" + subtext_bold: 00.02.002@5602 + - id: 5602.U1.001 + type: room + name: 5602.U1.001 (Technikraum) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: "-1.02.001@5602" + - id: 5602.U1.004 + type: room + name: 5602.U1.004 (Treppe im Freien) + subtext: "garching, Mathe/Info (MI)" + subtext_bold: "-1.02.004@5602" + n_visible: 6 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: "5602" + type: building + name: "\u0019Hörsaal\u0017 1 (BT02)" + subtext: Gebäudeteil + - id: mi + type: joined_building + name: "Fakultät Mathematik & Informatik (FMI oder \u0019MI\u0017)" + subtext: Gebäudekomplex + - id: "5605" + type: building + name: Finger 05 (BT05) + subtext: Gebäudeteil + - id: "5606" + type: building + name: Finger 06 (BT06) + subtext: Gebäudeteil + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-37.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-37.snap new file mode 100644 index 000000000..6fa88465a --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-37.snap @@ -0,0 +1,63 @@ +--- +source: src/search_executor/mod.rs +description: "This is 'N-1403@0104', but 'N1403@0104' can be before this" +expression: actual +info: "'n1403' should get '0104.U1.403' in 2 results # This is 'N-1403@0104', but 'N1403@0104' can be before this" +--- +- facet: rooms + entries: + - id: 0104.U1.403 + type: room + name: 0104.U1.403 (Fachschaft EI) + subtext: "stammgelände, E-Technik Elektrophysik (N4)" + subtext_bold: N-1403@0104 + - id: 0104.01.403 + type: room + name: 0104.01.403 (Büro) + subtext: "stammgelände, E-Technik Elektrophysik (N4)" + subtext_bold: N1403@0104 + - id: 0103.U1.311 + type: room + name: 0103.U1.311 (Praktikum/Umbau) + subtext: "stammgelände, E-Technik El. Maschinen / Geräte (N3)" + subtext_bold: N-1311@0103 + - id: 0108.U1.806A + type: room + name: 0108.U1.806A (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1806A@0108 + - id: 0108.U1.806B + type: room + name: 0108.U1.806B (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1806B@0108 + - id: 0108.U1.825 + type: room + name: 0108.U1.825 (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1825@0108 + - id: 0108.U1.825A + type: room + name: 0108.U1.825A (Experimenteller Raum) + subtext: "stammgelände, E-Technik Verfügungsgebäude (N8)" + subtext_bold: N-1825A@0108 + - id: 9201.EG.005 + type: room + name: 9201.EG.005 (Seminarraum 2) + subtext: TUM FZ Friedrich N. Schwarz Berchtesgaden + subtext_bold: EG-05@9201 + - id: 9201.EG.006 + type: room + name: 9201.EG.006 (Seminarraum 1) + subtext: TUM FZ Friedrich N. Schwarz Berchtesgaden + subtext_bold: EG-06@9201 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: sites_buildings + entries: + - id: "9201" + type: building + name: "TUM FZ Friedrich \u0019N\u0017. Schwarz Berchtesgaden" + subtext: Gebäude + n_visible: 0 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-4.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-4.snap new file mode 100644 index 000000000..1f8ad58ba --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-4.snap @@ -0,0 +1,60 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'interims' should get 'garching-interims' in 1 results" +--- +- facet: sites_buildings + entries: + - id: garching-interims + type: area + name: "\u0019Interimshörsäle\u0017" + subtext: Gebiet / Gruppe von Gebäuden + - id: "5539" + type: building + name: "\u0019Interims\u0017-Tentomax MW" + subtext: Gebäude + - id: "5416" + type: building + name: "\u0019Interimshörsäle\u0017 II, Jürgen Manchot-Hörsaalgebäude" + subtext: Gebäude + - id: "5620" + type: building + name: "\u0019Interimshörsäle\u0017 I" + subtext: Gebäude + n_visible: 4 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5416.01.003 + type: room + name: "5416.01.003 (Hörsaal 2, \"\u0019Interims\u0017 II\")" + subtext: "garching, Interims II" + subtext_bold: 003@5416 + - id: 5620.01.101 + type: room + name: "5620.01.101 (Hörsaal 1, \"\u0019Interims\u0017 I\")" + subtext: "garching, Interims I" + subtext_bold: 101@5620 + - id: 5620.01.102 + type: room + name: "5620.01.102 (Hörsaal 2, \"\u0019Interims\u0017 I\")" + subtext: "garching, Interims I" + subtext_bold: 102@5620 + - id: 5416.01.004 + type: room + name: "5416.01.004 (Hörsaal 1, Jürgen-Manchot-Hörsaal)" + subtext: "garching, Interims II" + subtext_bold: 004@5416 + - id: 5539.EG.001A + type: room + name: "5539.EG.001A (Hörsaal 1A, \"Zelt\")" + subtext: "garching, Interims III" + subtext_bold: 0.001A@5539 + - id: 5539.EG.001B + type: room + name: "5539.EG.001B (Hörsaal 1B, \"Zelt\")" + subtext: "garching, Interims III" + subtext_bold: 0.001B@5539 + n_visible: 6 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-5.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-5.snap new file mode 100644 index 000000000..65d6fdbc5 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-5.snap @@ -0,0 +1,63 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'Interims 2' should get '5416' in 1 results" +--- +- facet: sites_buildings + entries: + - id: "5416" + type: building + name: "\u0019Interimshörsäle\u0017 \u0019II\u0017, Jürgen Manchot-Hörsaalgebäude" + subtext: Gebäude + n_visible: 1 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5416.01.003 + type: room + name: "5416.01.003 (Hörsaal \u00192\u0017, \"\u0019Interims\u0017 \u0019II\u0017\")" + subtext: "garching, Interims II" + subtext_bold: 003@5416 + - id: 5416.01.004 + type: room + name: "5416.01.004 (Hörsaal 1, Jürgen-Manchot-Hörsaal)" + subtext: "garching, Interims II" + subtext_bold: 004@5416 + - id: 5620.01.102 + type: room + name: "5620.01.102 (Hörsaal \u00192\u0017, \"\u0019Interims\u0017 I\")" + subtext: "garching, Interims I" + subtext_bold: 102@5620 + - id: 5539.EG.002 + type: room + name: "5539.EG.002 (Hörsaal \u00192\u0017, \"Zelt\")" + subtext: "garching, Interims III" + subtext_bold: 0.002@5539 + - id: 5416.EG.010 + type: room + name: 5416.EG.010 (IT/Audio) + subtext: "garching, Interims II" + subtext_bold: 010@5416 + - id: 5416.EG.005 + type: room + name: 5416.EG.005 (WC-Vorraum Damen u. Herren) + subtext: "garching, Interims II" + subtext_bold: 005@5416 + - id: 5416.EG.006 + type: room + name: 5416.EG.006 (WC-Herren) + subtext: "garching, Interims II" + subtext_bold: 006@5416 + - id: 5416.EG.007 + type: room + name: 5416.EG.007 (WC-Beh.) + subtext: "garching, Interims II" + subtext_bold: 007@5416 + - id: 5416.EG.008 + type: room + name: 5416.EG.008 (Putzraum) + subtext: "garching, Interims II" + subtext_bold: 008@5416 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-6.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-6.snap new file mode 100644 index 000000000..ced7ec73b --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-6.snap @@ -0,0 +1,63 @@ +--- +source: src/search_executor/mod.rs +description: "Should give the 'new' mensa" +expression: actual +info: "'Mensa Garching' should get '5304' in 1 results # Should give the 'new' mensa" +--- +- facet: sites_buildings + entries: + - id: "5304" + type: building + name: "\u0019Mensa\u0017 \u0019Garching\u0017" + subtext: Gebäude + n_visible: 1 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5304.01.101 + type: room + name: 5304.01.101 (Speisesaal) + subtext: "garching, Mensa Garching" + subtext_bold: 1.101@5304 + - id: 5304.01.102 + type: room + name: 5304.01.102 (Vor-/Verteilerbereich) + subtext: "garching, Mensa Garching" + subtext_bold: 1.102@5304 + - id: 5304.01.103 + type: room + name: 5304.01.103 (Free Flow) + subtext: "garching, Mensa Garching" + subtext_bold: 1.103@5304 + - id: 5304.01.104 + type: room + name: 5304.01.104 (Produktionsküche) + subtext: "garching, Mensa Garching" + subtext_bold: 1.104@5304 + - id: 5304.01.201 + type: room + name: 5304.01.201 (Geschirrspüle) + subtext: "garching, Mensa Garching" + subtext_bold: 1.201@5304 + - id: 5304.01.203 + type: room + name: 5304.01.203 (Küchenchef) + subtext: "garching, Mensa Garching" + subtext_bold: 1.203@5304 + - id: 5304.01.301 + type: room + name: 5304.01.301 (Geschirrspüle) + subtext: "garching, Mensa Garching" + subtext_bold: 1.301@5304 + - id: 5304.01.302 + type: room + name: 5304.01.302 (Schwarzgeschirrspüle) + subtext: "garching, Mensa Garching" + subtext_bold: 1.302@5304 + - id: 5304.01.307 + type: room + name: 5304.01.307 (Putzraum) + subtext: "garching, Mensa Garching" + subtext_bold: 1.307@5304 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-7.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-7.snap new file mode 100644 index 000000000..e9908da0a --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-7.snap @@ -0,0 +1,63 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'neue Mensa' should get '5304' in 1 results" +--- +- facet: sites_buildings + entries: + - id: "5304" + type: building + name: "\u0019Mensa\u0017 \u0019Garching\u0017" + subtext: Gebäude + n_visible: 1 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5304.01.101 + type: room + name: 5304.01.101 (Speisesaal) + subtext: "garching, Mensa Garching" + subtext_bold: 1.101@5304 + - id: 5304.01.102 + type: room + name: 5304.01.102 (Vor-/Verteilerbereich) + subtext: "garching, Mensa Garching" + subtext_bold: 1.102@5304 + - id: 5304.01.103 + type: room + name: 5304.01.103 (Free Flow) + subtext: "garching, Mensa Garching" + subtext_bold: 1.103@5304 + - id: 5304.01.104 + type: room + name: 5304.01.104 (Produktionsküche) + subtext: "garching, Mensa Garching" + subtext_bold: 1.104@5304 + - id: 5304.01.201 + type: room + name: 5304.01.201 (Geschirrspüle) + subtext: "garching, Mensa Garching" + subtext_bold: 1.201@5304 + - id: 5304.01.203 + type: room + name: 5304.01.203 (Küchenchef) + subtext: "garching, Mensa Garching" + subtext_bold: 1.203@5304 + - id: 5304.01.301 + type: room + name: 5304.01.301 (Geschirrspüle) + subtext: "garching, Mensa Garching" + subtext_bold: 1.301@5304 + - id: 5304.01.302 + type: room + name: 5304.01.302 (Schwarzgeschirrspüle) + subtext: "garching, Mensa Garching" + subtext_bold: 1.302@5304 + - id: 5304.01.307 + type: room + name: 5304.01.307 (Putzraum) + subtext: "garching, Mensa Garching" + subtext_bold: 1.307@5304 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-8.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-8.snap new file mode 100644 index 000000000..f669bdbc6 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-8.snap @@ -0,0 +1,61 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'Physik Container' should get '5140' in 1 results" +--- +- facet: sites_buildings + entries: + - id: "5140" + type: building + name: "\u0019Physik\u0017 I \u0019Container\u0017" + subtext: Gebäude + - id: "5124" + type: building + name: "WSI \u0019Container\u0017" + subtext: Gebäude + - id: "5160" + type: building + name: "UCN-Testanlage (\u0019Container\u0017)" + subtext: Gebäude + n_visible: 3 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5140.01.201 + type: room + name: 5140.01.201 (Tutorraum) + subtext: "garching, Physik I Container" + subtext_bold: C.3201@5140 + - id: 5140.01.202 + type: room + name: 5140.01.202 (Tutorraum) + subtext: "garching, Physik I Container" + subtext_bold: C.3202@5140 + - id: 5140.01.203 + type: room + name: 5140.01.203 (Tutorraum) + subtext: "garching, Physik I Container" + subtext_bold: C.3203@5140 + - id: 5140.01.204 + type: room + name: 5140.01.204 (CIP-Raum) + subtext: "garching, Physik I Container" + subtext_bold: C.3204@5140 + - id: 5140.01.205 + type: room + name: 5140.01.205 (CIP-Raum) + subtext: "garching, Physik I Container" + subtext_bold: C.3205@5140 + - id: 5140.01.206 + type: room + name: 5140.01.206 (CIP-Raum) + subtext: "garching, Physik I Container" + subtext_bold: C.3206@5140 + - id: 5140.01.207 + type: room + name: 5140.01.207 (CIP-Raum) + subtext: "garching, Physik I Container" + subtext_bold: C.3207@5140 + n_visible: 7 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-9.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-9.snap new file mode 100644 index 000000000..f81b951a7 --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries-9.snap @@ -0,0 +1,62 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'znn' should get '5115' in 1 results" +--- +- facet: sites_buildings + entries: + - id: "5115" + type: building + name: "Zentrum für Nanotechnologie & -materialien (\u0019ZNN\u0017)" + subtext: Gebäude + - id: "5116" + type: building + name: "Trafostation des \u0019ZNN\u0017" + subtext: Gebäude + n_visible: 2 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 5115.EG.001 + type: room + name: 5115.EG.001 (Seminarraum) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 0.001@5115 + - id: 5115.01.008 + type: room + name: 5115.01.008 (Kopierraum) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 1.008@5115 + - id: 5115.01.011 + type: room + name: 5115.01.011 (Chemie Labor) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 1.011@5115 + - id: 5115.01.011A + type: room + name: 5115.01.011A (Chemie Labor) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 1.011A@5115 + - id: 5115.01.019 + type: room + name: 5115.01.019 (Spektroskopie) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 1.019@5115 + - id: 5115.01.020 + type: room + name: 5115.01.020 (Spektroskopie) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 1.020@5115 + - id: 5115.01.021 + type: room + name: 5115.01.021 (Spektroskopie) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 1.021@5115 + - id: 5115.01.022 + type: room + name: 5115.01.022 (Technik) + subtext: "garching, Zentrum für Nanotechnologie & -materialien (ZNN)" + subtext_bold: 1.022@5115 + n_visible: 8 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries.snap b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries.snap new file mode 100644 index 000000000..9acdbee3e --- /dev/null +++ b/server/src/search_executor/snapshots/navigatum_server__search_executor__test__good_queries.snap @@ -0,0 +1,63 @@ +--- +source: src/search_executor/mod.rs +description: "" +expression: actual +info: "'hochbrück' should get 'garching-hochbrueck' in 1 results" +--- +- facet: sites_buildings + entries: + - id: garching-hochbrueck + type: site + name: "Garching \u0019Hochbrück\u0017" + subtext: Standort + n_visible: 1 + estimatedTotalHits: "[estimatedTotalHits]" +- facet: rooms + entries: + - id: 8101.02.136 + type: room + name: "8101.02.136 (\u0019Hochbrück\u0017-Bibliothek)" + subtext: "garching-hochbrück, Business Campus 1" + subtext_bold: 2.01.36@8101 + - id: 8101.02.235 + type: room + name: "8101.02.235 (\u0019Hochbrück\u0017-Kommunikationsraum)" + subtext: "garching-hochbrück, Business Campus 1" + subtext_bold: 2.02.35@8101 + - id: 8102.03.111 + type: room + name: "8102.03.111 (\u0019Hochbrück\u0017-Kommunikation 1)" + subtext: "garching-hochbrück, Business Campus 2" + subtext_bold: 3.1.11@8102 + - id: 8102.03.216 + type: room + name: "8102.03.216 (\u0019Hochbrück\u0017-Konferenz)" + subtext: "garching-hochbrück, Business Campus 2" + subtext_bold: 3.2.16@8102 + - id: 8102.03.233 + type: room + name: "8102.03.233 (\u0019Hochbrück\u0017-Kommunikation 2)" + subtext: "garching-hochbrück, Business Campus 2" + subtext_bold: 3.2.33@8102 + - id: 8102.03.302 + type: room + name: "8102.03.302 (\u0019Hochbrück\u0017-Kommunikation 3)" + subtext: "garching-hochbrück, Business Campus 2" + subtext_bold: 3.3.02@8102 + - id: 8102.03.428 + type: room + name: "8102.03.428 (\u0019Hochbrück\u0017-Konferenz)" + subtext: "garching-hochbrück, Business Campus 2" + subtext_bold: 3.4.28@8102 + - id: 8102.03.433 + type: room + name: "8102.03.433 (\u0019Hochbrück\u0017-Kommunikation 4)" + subtext: "garching-hochbrück, Business Campus 2" + subtext_bold: 3.4.33@8102 + - id: 8102.03.502 + type: room + name: "8102.03.502 (\u0019Hochbrück\u0017-Kommunikation 5)" + subtext: "garching-hochbrück, Business Campus 2" + subtext_bold: 3.5.02@8102 + n_visible: 9 + estimatedTotalHits: "[estimatedTotalHits]" diff --git a/server/src/search/search_executor/test-queries.bad.yaml b/server/src/search_executor/test-queries.bad.yaml similarity index 100% rename from server/src/search/search_executor/test-queries.bad.yaml rename to server/src/search_executor/test-queries.bad.yaml diff --git a/server/src/search/search_executor/test-queries.good.yaml b/server/src/search_executor/test-queries.good.yaml similarity index 100% rename from server/src/search/search_executor/test-queries.good.yaml rename to server/src/search_executor/test-queries.good.yaml