Can I treat this as an object? Will I be able to q...
# community-help
j
Can I treat this as an object? Will I be able to query for documents with a specific field of this object? Or does typesense expect that every object has the same fields "fields": [ {"name": "fieldName", "type": "object"} ] vs. "fields": [ {"name": "fieldName.*", "type": "auto"} ]
j
CC: @Fanis Tharropoulos
f
The first time you index something while inferring the document's structure, Typesense will expect that structure from then on. If there is an optional value for example, and the first document indexed includes it, Typesense will error if you don't pass it in later. I'd advise using dot notation and explicit schema definition to avoid potential problems down the line. Be sure to use
enable_nested_fields
as well.
j
Will do. Thanks!