mirror of
https://github.com/typesense/typesense.git
synced 2025-05-19 21:22:25 +08:00
Change response status code for non-indexed field search
This commit is contained in:
parent
004f6eae03
commit
8c6c8d08d7
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user