Hey all, I'm trying to create a collection in typ...
# community-help
l
Hey all, I'm trying to create a collection in typesense cloud with firebase extension. Just wanted to know are objects not supported?
calories = {
  
calories: 200,
  
protein: 30,
  
carbs: 10
}
Copy code
Request failed with HTTP code 400 | Server said: Type of field `calories` is invalid.
k
Yes, Typesense does not support indexing nested objects yet.
The fields need to be "flattened" out.
l
Yeah, I've seen once it's flattened it works.
k
We've a feature request open for it here (https://github.com/typesense/typesense/issues/227). It's a bit of an involved change, but we certainly think it is a good feature to support in future.
l
Thanks for that! Just a quick one, so let's say I want to implement tags for searching. Would I have to do it like this:
isVegan: true
instead of obviously storing in array.
k
Array of strings is fine. What we don't support is a dictionary. So you can't index a dictionary like
person: {name: "foo", age: 20}
-- instead you need to have 2 fields "person.name" and "person.age" separately.