Change response status code for non-indexed field search

This commit is contained in:
Brian Weeteling 2022-03-15 18:15:00 +01:00 committed by GitHub
parent 004f6eae03
commit 8c6c8d08d7

View File

@ -569,7 +569,7 @@ Option<nlohmann::json> Collection::search(const std::string & raw_query, const s
if(!search_field.index) {
std::string error = "Field `" + field_name + "` is marked as a non-indexed field in the schema.";
return Option<nlohmann::json>(404, error);
return Option<nlohmann::json>(400, error);
}
if(search_field.type != field_types::STRING && search_field.type != field_types::STRING_ARRAY) {