fix error on stop words fst

This commit is contained in:
Quentin de Quelen 2020-01-18 16:11:40 +01:00 committed by qdequele
parent 38d57d213f
commit 6f534540a6
No known key found for this signature in database
GPG Key ID: B3F0A000EBF11745
3 changed files with 4 additions and 8 deletions

View File

@ -197,8 +197,6 @@ pub fn apply_stop_words_update(
)?;
}
main_store.put_stop_words(writer, stop_words)?;
Ok(must_reindex)
}
@ -341,7 +339,6 @@ pub fn apply_synonyms_update(
.unwrap();
main_store.put_synonyms_fst(writer, &synonyms_set)?;
main_store.put_synonyms(writer, synonyms)?;
Ok(())
}

View File

@ -19,7 +19,6 @@ bincode = "1.2.0"
chrono = { version = "0.4.9", features = ["serde"] }
crossbeam-channel = "0.4.0"
env_logger = "0.7.1"
fst = { version = "0.3.5", default-features = false }
heed = "0.6.1"
http = "0.1.19"
indexmap = { version = "1.3.0", features = ["serde-1"] }
@ -46,6 +45,7 @@ whoami = "0.6"
http-service-mock = "0.4.0"
http-service = "0.4.0"
tempdir = "0.3.7"
assert-json-diff = "1.0.1"
[build-dependencies]
vergen = "3.0.4"

View File

@ -137,8 +137,8 @@ impl From<heed::Error> for ResponseError {
}
}
impl From<fst::Error> for ResponseError {
fn from(err: fst::Error) -> ResponseError {
impl From<meilisearch_core::FstError> for ResponseError {
fn from(err: meilisearch_core::FstError) -> ResponseError {
ResponseError::internal(err)
}
}
@ -149,7 +149,6 @@ impl From<SearchError> for ResponseError {
}
}
pub trait IntoInternalError<T> {
fn into_internal_error(self) -> SResult<T>;
}
@ -159,7 +158,7 @@ impl <T> IntoInternalError<T> for Option<T> {
fn into_internal_error(self) -> SResult<T> {
match self {
Some(value) => Ok(value),
None => Err(ResponseError::internal("Heed "))
None => Err(ResponseError::internal("Heed cannot find requested value"))
}
}
}