mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
style fixes
This commit is contained in:
parent
d9e2e1a177
commit
05344043b2
13 changed files with 51 additions and 56 deletions
|
@ -96,4 +96,3 @@ impl Data {
|
|||
data
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use std::fmt;
|
||||
use std::error;
|
||||
use std::fmt;
|
||||
|
||||
use actix_http::ResponseBuilder;
|
||||
use actix_web as aweb;
|
||||
use actix_web::error::JsonPayloadError;
|
||||
use actix_web::http::StatusCode;
|
||||
use serde_json::json;
|
||||
use actix_web::error::JsonPayloadError;
|
||||
|
||||
use meilisearch_error::{ErrorCode, Code};
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ use meilisearch_core::update;
|
|||
use serde::Deserialize;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::Data;
|
||||
use crate::error::{Error, ResponseError};
|
||||
use crate::helpers::Authentication;
|
||||
use crate::routes::{IndexParam, IndexUpdateResponse};
|
||||
use crate::Data;
|
||||
|
||||
type Document = IndexMap<String, Value>;
|
||||
|
||||
|
@ -192,7 +192,7 @@ async fn update_multiple_documents(
|
|||
|
||||
let update_id = data
|
||||
.db
|
||||
.update_write::<_, _, ResponseError>(move |writer| {
|
||||
.update_write::<_, _, ResponseError>(|writer| {
|
||||
let update_id = document_addition.finalize(writer)?;
|
||||
Ok(update_id)
|
||||
})?;
|
||||
|
|
|
@ -24,6 +24,7 @@ async fn set_healthy(data: web::Data<Data>) -> Result<HttpResponse, ResponseErro
|
|||
data.db.set_healthy(writer)?;
|
||||
Ok(())
|
||||
})?;
|
||||
|
||||
Ok(HttpResponse::Ok().finish())
|
||||
}
|
||||
|
||||
|
@ -32,6 +33,7 @@ async fn set_unhealthy(data: web::Data<Data>) -> Result<HttpResponse, ResponseEr
|
|||
data.db.set_unhealthy(writer)?;
|
||||
Ok(())
|
||||
})?;
|
||||
|
||||
Ok(HttpResponse::Ok().finish())
|
||||
}
|
||||
|
||||
|
|
|
@ -65,11 +65,11 @@ async fn get_all(
|
|||
|
||||
let stop_words: BTreeSet<String> = index
|
||||
.main
|
||||
.stop_words_list(&reader)?
|
||||
.stop_words(&reader)?
|
||||
.into_iter()
|
||||
.collect();
|
||||
|
||||
let synonyms_list = index.main.synonyms_list(&reader)?;
|
||||
let synonyms_list = index.main.synonyms(&reader)?;
|
||||
|
||||
let mut synonyms = BTreeMap::new();
|
||||
let index_synonyms = &index.synonyms;
|
||||
|
|
|
@ -25,7 +25,7 @@ async fn get(
|
|||
.open_index(&path.index_uid)
|
||||
.ok_or(Error::index_not_found(&path.index_uid))?;
|
||||
let reader = data.db.main_read_txn()?;
|
||||
let stop_words = index.main.stop_words_list(&reader)?;
|
||||
let stop_words = index.main.stop_words(&reader)?;
|
||||
|
||||
Ok(HttpResponse::Ok().json(stop_words))
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ async fn get(
|
|||
|
||||
let reader = data.db.main_read_txn()?;
|
||||
|
||||
let synonyms_list = index.main.synonyms_list(&reader)?;
|
||||
let synonyms_list = index.main.synonyms(&reader)?;
|
||||
|
||||
let mut synonyms = IndexMap::new();
|
||||
let index_synonyms = &index.synonyms;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue