Troubles with Flattening Nested Field in Index
TLDR User Mojan had problems flattening a nested field in an index. User Jason advised to use 'versions.doc_description' instead of 'doc_description' in the search query.

Sep 12, 2023 (2 weeks ago)
Mojan
06:11 PM{
...
'versions' : [{ 'doc_description': string]
}
I have tried doing this :
{
'name': 'versions.doc_description',
'type': 'string[]',
'facet': True
},
but keeps getting the error shown in the screenshot (not found).
Does anyone have an idea how I should go about this ?
Jason
06:16 PMdoc_description
instead of versions.doc_description
Mojan
06:19 PM
Typesense
Indexed 2764 threads (79% resolved)
Similar Threads
Flattening Project "Members" Nested Fields in JSON for Indexing
Sachin needed help in flattening nested fields for indexing. Jason and CaptainCodeman suggested only searchable items need to be flattened and added to the schema.

Defining fields to index of a nested object without flattening
Taj asked how to index fields of a nested object without flattening. Jason clarified this is possible and the object need not be in the schema. To clarify things further, Jason updated the docs.



Handling Nested Objects in Typesense
Darren queried about storing arrays of objects in Typesense. Kishore Nallan advised that Typesense doesn't support nesting but shared alternative reindexing methods. They added improved nesting support is planned for the future.