Can a schema contain a `default_sorting_field` wh...
# community-help
h
Can a schema contain a
default_sorting_field
which is not present in
fields
? Is this schema valid?
Copy code
{
  "num_documents": 1250,
  "name": "ceos",
  "fields": [
    {
      "name": "company_name",
      "type": "string"
    },
    {
      "name": "full_name",
      "type": "string"
    },
    {
      "name": "from_year",
      "type": "int32"
    }
  ],
  "default_sorting_field": "num_employees"
}
k
No that's not valid. Also, from v0.20, default sorting field is actually optional.
h
k
Copy paste error 🙂
h
🙂
from_year
should be the value of
default_sorting_field
?
k
Yes
h
Let me open a pr
k
Thank you!
👍 1