From 8c6c8d08d770195ae9e4104bed5e4bd5eaeac1b9 Mon Sep 17 00:00:00 2001 From: Brian Weeteling Date: Tue, 15 Mar 2022 18:15:00 +0100 Subject: [PATCH] Change response status code for non-indexed field search --- src/collection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {