Closed alegzable closed 1 year ago
Could you try with this version of the extension: https://github.com/typesense/firestore-typesense-search/issues/43#issuecomment-1459124822
@jasonbosco, that works, thank you! When can we expect this to be included in the normal release?
This is now available in the latest GA release.
Description
I'm trying to sync unflattened objects into my Typesense collection, however I get the following error:
Typesense config
If I change the type of the "address" to "auto", the sync works, but the "address" field is flattened:
I would like to be able to search by all "address" properties, but have the search return it as an unflattened object. I don't mind it returning both types of results, but I don't want to have to parse flattened objects into JS objects. According to the docs, I can send both flattened and unflattened version of the object, but I haven't been able to achieve this.
To simplify traversing the data in the results, you might want to send both the flattened and unflattened version of the nested fields into Typesense, and only set the flattened keys as indexed in the collection's schema and use them for search/filtering/faceting. At display time when parsing the results, you can then use the nested version. (https://typesense.org/docs/0.24.0/api/collections.html#notes-on-indexing-common-types-of-data)
As a side note, I have been able to sync and search arrays of objects using this simple configuration:
Expected Behavior
Return objects from search.
Actual Behavior
Objects in search results are flattened.
Metadata
Typesense Version: v0.24.0 (typesense-js v.1.5.2)