From 7c54814ef6bae8e45b9fc1104e23f866264dc97b Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Fri, 30 Sep 2022 21:30:41 +0200 Subject: [PATCH] allowed configuring of the address, meili is served from This is relevant for an eazier getting started guide for the webclient --- server/src/core/search/search_executor/meilisearch.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/core/search/search_executor/meilisearch.rs b/server/src/core/search/search_executor/meilisearch.rs index f55fe181d..9028dd1bb 100644 --- a/server/src/core/search/search_executor/meilisearch.rs +++ b/server/src/core/search/search_executor/meilisearch.rs @@ -71,7 +71,6 @@ pub(super) struct MSHit { } #[derive(Deserialize, Clone)] -#[allow(dead_code)] pub(super) struct FormattedMSHit { // This contains all the atributes of MSHit, but formatted by MS. We only need some, so only some are listed here. pub(super) name: String, @@ -104,7 +103,8 @@ pub(super) async fn do_meilisearch(client: Client, args: MSSearchArgs) -> Result // meilisearch should not be a public service as by their docs, // this is why we only let users configure the port here :) let url = format!( - "http://localhost:{}/indexes/entries/search", + "http://{}:{}/indexes/entries/search", + std::env::var("MIELI_SEARCH_ADDR").unwrap_or_else(|_| "localhost".to_string()), std::env::var("API_SVC_SERVICE_PORT_MIELI_SEARCH").unwrap_or_else(|_| "7700".to_string()) );