mirror of
https://github.com/typesense/typesense.git
synced 2025-05-23 23:30:42 +08:00
Merge pull request #550 from brianweet/fix/non-indexed-field-search
Change response status code for non-indexed field search
This commit is contained in:
commit
e696f7299e
@ -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