diff --git a/src/collection.cpp b/src/collection.cpp index 56e29282..443a96ef 100644 --- a/src/collection.cpp +++ b/src/collection.cpp @@ -569,7 +569,7 @@ Option 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(404, error); + return Option(400, error); } if(search_field.type != field_types::STRING && search_field.type != field_types::STRING_ARRAY) {