Discussing Firestore Extension and Collection Schema in Typesense

TLDR Loic asks about settings in Firestore Extension and experiences issues with the collection schema in Typesense. Discussion with Jason is ongoing.

Photo of Loic
Loic
Wed, 30 Aug 2023 23:18:03 UTC

Jason Hi Jason, In Firesbase Extension, the doc says to set "Yes" in both cases, is this normal? ```Adds a new parameter that controls whether a nested Firestore document is flattened by the extension, or sent as is to Typesense. If you are running Typesense Server v0.23.1 or below, set "Flatten Nested Documents" to "Yes" (since indexing nested fields is not supported in these versions). If you are running Typesense Server v0.24 or above, set "Flatten Nested Documents" to "Yes" (since indexing nested fields is natively supported in Typesense in these versions).```

Photo of Jason
Jason
Wed, 30 Aug 2023 23:19:32 UTC

Hmm, may I know where you see this? I did fix the typo in the changelog here:

Photo of Loic
Loic
Wed, 30 Aug 2023 23:20:39 UTC

Update extension version

Photo of Jason
Jason
Wed, 30 Aug 2023 23:21:44 UTC

Looks like the changelogs in the Firebase UI don't get updated after submitting the version to the extension hub

Photo of Loic
Loic
Wed, 30 Aug 2023 23:23:00 UTC

Got you, at least the tooltip on the textfield to actually pick Yes or No shows the good info :+1:

Photo of Loic
Loic
Wed, 06 Sep 2023 16:09:23 UTC

Jason Hi Jason, I have a problem with my collection schema. I have a class as below:

Photo of Loic
Loic
Wed, 06 Sep 2023 16:09:33 UTC

```class Temperatures { String brokerId; List<PickedProduct> pickedProduct; Temperatures({ required this.brokerId, required this.pickedProduct, }); } class PickedProduct { String uniqueTicker; int brokerRetailPrice; String brokerCurrency; String brokerDescription; bool showOriginalPictures; bool showGenericPictureFirst; PickedProduct({ required this.uniqueTicker, required this.brokerRetailPrice, required this.brokerCurrency, required this.brokerDescription, required this.showOriginalPictures, required this.showGenericPictureFirst, }); }```

Photo of Loic
Loic
Wed, 06 Sep 2023 16:09:44 UTC

That gives a Json like this:

Photo of Loic
Loic
Wed, 06 Sep 2023 16:09:46 UTC

```{ "brokerId": "abc", "pickedProduct": [ { "uniqueTicker" : "abc", "brokerRetailPrice" : 100, "brokerCurrency" : "abc", "brokerDescription" : "abc", "showOriginalPictures" : true, "showGenericPictureFirst" : true } ] }```

Photo of Loic
Loic
Wed, 06 Sep 2023 16:10:28 UTC

How to store the List<pickedProduct> in the collection schema?

Photo of Loic
Loic
Wed, 06 Sep 2023 16:10:59 UTC

I have tried the Object[] but it doesn't seem to be the good solution

Photo of Jason
Jason
Wed, 06 Sep 2023 16:55:24 UTC

`object[]` would indeed be the way to store that object, since it's an array of objects. Could you elaborate on why it's not a good solution?