From 06e6eaa7b4b7f6d46851b5356ee4f80698472039 Mon Sep 17 00:00:00 2001 From: many Date: Wed, 3 Nov 2021 16:10:35 +0100 Subject: [PATCH] Remove useless Facet variant --- meilisearch-error/src/lib.rs | 3 --- meilisearch-lib/src/index_controller/dump_actor/loaders/v2.rs | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/meilisearch-error/src/lib.rs b/meilisearch-error/src/lib.rs index 04c6391f9..ead2c08c7 100644 --- a/meilisearch-error/src/lib.rs +++ b/meilisearch-error/src/lib.rs @@ -63,7 +63,6 @@ pub enum Code { MissingDocumentId, InvalidDocumentId, - Facet, Filter, Sort, @@ -133,8 +132,6 @@ impl Code { MissingDocumentId => ErrCode::invalid("missing_document_id", StatusCode::BAD_REQUEST), InvalidDocumentId => ErrCode::invalid("invalid_document_id", StatusCode::BAD_REQUEST), - // error related to facets - Facet => ErrCode::invalid("invalid_facet", StatusCode::BAD_REQUEST), // error related to filters Filter => ErrCode::invalid("invalid_filter", StatusCode::BAD_REQUEST), // error related to sorts diff --git a/meilisearch-lib/src/index_controller/dump_actor/loaders/v2.rs b/meilisearch-lib/src/index_controller/dump_actor/loaders/v2.rs index ebaa7d3ff..62126e91a 100644 --- a/meilisearch-lib/src/index_controller/dump_actor/loaders/v2.rs +++ b/meilisearch-lib/src/index_controller/dump_actor/loaders/v2.rs @@ -367,7 +367,7 @@ mod compat { "invalid_request" => Code::InvalidRankingRule, "max_fields_limit_exceeded" => Code::MaxFieldsLimitExceeded, "missing_document_id" => Code::MissingDocumentId, - "invalid_facet" => Code::Facet, + "invalid_facet" => Code::Filter, "invalid_filter" => Code::Filter, "invalid_sort" => Code::Sort, "bad_parameter" => Code::BadParameter,