Configuring Typesense Extension for Nested Fields in Firebase Collection
TLDR 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.
4
May 08, 2023 (7 months ago)
David
05:28 PM• Data doesn't sync with typesense when I add
field1.nestedField1
in the Firestore Collection Fields
input when configuring the extension. • Data does sync with typesense if I only put
field1
in the same input, but then my typesense schema appears to auto-update to include every nested field within field1
Should I be able to target nested fields in
Firestore Collection Fields
with dot notation? If so, should each value that I provide to Firestore Collection Fields
correlate with a field item in my typesense schema? And is the schema supposed to auto-update after I connect typesense to my firebase collection?I'm not finding much information online about how to properly configure the firebase extension to work with nested fields, but I know that's a fairly new feature. Thanks in advance.
Jason
05:57 PMJason
05:58 PMDavid
06:56 PMFirestore Collection Fields
I should specify field1
, and then in my schema I need to provide info for field1
, as well as all relevant nested fields I want to index, like: "fields":[
{
"name": "field1",
"type": "object"
},
{
"name": "field1.nested1",
"type": "object[]"
},
{
"name": "field1.nested1.nested2",
"type": "string[]"
},
{
"name": "field1.nested1.nested3",
"type": "object[]"
},
{
"name": "field1.nested1.nested3.nested4",
"type": "string[]"
},
{
"name": "field1.nested1.nested3.nested5",
"type": "string[]"
}
]
David
06:58 PMcollection settings
increases in length by abouce 4x, to include every other nested field in field1
... You're saying this is also expected?Jason
07:02 PM1
Jason
07:02 PMfield1.nested1.nested3.nested5
, you can skip the other items in your example, from the schema1
Jason
07:03 PM{
"name": "field1",
"type": "object"
},
Jason
07:03 PMDavid
07:04 PM1
David
08:01 PMfield1.nested1.nested2
which looks likefield1: {
nested1: [ ... { nested2: <value> } ]
}
and I see
Error: Request failed with HTTP code 404 | Server said: Field field1.nested1.nested2 not found.
in the firebase logs
David
08:11 PMJason
08:23 PM1
David
08:49 PMTypesense
Indexed 3005 threads (79% resolved)
Similar Threads
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.
Specific Collection Backfill and Schema Config in Firebase Extension
Loic asked Jason about backfilling specific collections with the Firebase Extension and configuring collection schemas. The latter explained current limitations and gave advices about handling attributes for search/filtering, storage, and return.
Discussion on Firebase Extension for Typesense
Jason announced the release of a Firebase Extension for Typesense, leading to a discussion with Gabe about capabilities and scalability concerns. Other users, John and A, simply expressed their admiration.
Firestore to Typesense Backfill Issue with Dynamic Paths
Greg experienced issues with Firestore to Typesense backfill not working, and Jason determined it might be related to dynamic paths in Firestore collections not being supported. An RC version of the extension with dynamic path support was considered but needs further review before being shared with Greg.
Issues with Schema Creation and Nested Fields
Sean encountered a problem with schema creation involving auto nested fields. Kishore Nallan suggested checking the API response for errors and adding problematic fields to the schema as optional. Sean confirmed the advice.