Handling Nested Objects in Typesense
TLDR 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.
Dec 27, 2021 (21 months ago)
Darren
10:09 AMnotifications[{ message: <string>, level: <string> } ... ]
- seems like from the docs, I can't store this at typsense as there is no support for a nested object like this that I can turn into an array? I would have liked from the search results to show the level of any notifications in search results, but I guess I can't? Perhaps if I restructure it on indexing to be { '0': { message, level }, '1': { message, level } ... }
... thoughts?Kishore Nallan
10:19 AMmessages: ["m1", "m2"]
levels: [1, 2, 3]
Then with some client side code you can show the level.
Kishore Nallan
10:20 AMDarren
10:32 AMPS - just to confirm - typesense does support nested paths yes? eg
<http://status.is:1|status.is:1>
as a filter? Just asking because I can't results returned with such a filter and I couldn't find any reference or example in the docs that nested paths are supportedKishore Nallan
10:33 AMDarren
10:34 AMKishore Nallan
10:34 AM<http://status.is|status.is>
but it is just a regular field name. People use dots to refer to fields that they "flatten" out this way prior to indexing.Darren
10:36 AMKishore Nallan
10:36 AMDarren
10:46 AMKishore Nallan
10:46 AMKishore Nallan
12:54 PMDarren
02:14 PMJan 04, 2022 (20 months ago)
Martin
05:02 AMTypesense
Indexed 2764 threads (79% resolved)
Similar Threads
Discussing Support for Nested Objects in Typesense
Martin expressed the need for support for nested objects in Typesense. Kishore Nallan mentioned the possibility of flattening objects before indexing and restoring them later. An issue has been created on GitHub to track this.

Configuring Typesense Extension for Nested Fields in Firebase Collection
David had issues indexing nested fields using the Typesense extension. Jason offered advice on specifying schemas and prioritizing specific fields, but there remained unresolved challenges with the schema.

Discussing Issues and Improvements for Typesense
Greg shared feedback and raised questions about Typesense, specifically about nested objects, rate limiting, and documentation. Kishore Nallan provided explanations, confirming that non-searchable fields can be stored and noting to improve documentation clarity.


Nested Objects Issue in Firebase & Typesense Integration
Shaun encountered issues with nested objects being flattened in Typesense. Jason found the root issue and provided a solution involving updating the Firebase extension to 1.0.3.



Querying with Typesense-Js and Handling Null Values
michtio was querying using typesense-js and receiving fewer results than expected. Kishore Nallan suggested using different query parameters. Further discussion led to the handling of 'null' values and filtering syntax in the search queries. The thread ended with Jason offering migration support from Algolia to Typesense.


