This message was deleted.
# community-help
s
This message was deleted.
j
How do you do it in the UI today? I can share the equivalent API endpoint
j
In the Collection Settings, I click the Update Schema button. From there, I paste the following: for example, for the
same_country
field:
Copy code
{
  "fields": [
    {
      "name": "same_country",
      "drop": true
    },
    {
      "facet": true,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "same_country",
      "optional": true,
      "sort": false,
      "type": "string"
    },
  ]
}
after click the update button, the facet is now set as
true
for that field. I have to do this for every field that I want to set as facet true.
j
j
Thanks!
👍 1
@Jason Bosco I am facing a weird error on the UI. When I want to update the facet for x field, I get this error for the y field:
Copy code
Error: e: Request failed with HTTP code 400 | Server said: Schema change is incompatible with the type of documents already stored in this collection. Existing data for field `education.country` cannot be coerced into an array of string.
I am actually not doing anything with
education.country
.
j
I think this might be due to a bug in the version of Typesense you're running. Could you upgrade to 0.25.2.rc1 and try again?
j
Thank you so much @Jason Bosco. The issue is resolved after the upgrade.
👍 1