Querying Nested Fields in a Collection with Dynamic Contributors
TLDR Greg asked about querying nested fields with unknown number of contributors in collection. Jason suggested dynamically fetching the collection's schema.
1
Sep 29, 2022 (15 months ago)
Greg
11:00 PMFor example, we may have up to 20 contributors in the list with keys contributor1, contributor2…contributor20. It may grow beyond 20. The test records I have now only go up to contributor5. I am dynamically adding contributors 1 through 20 in the query, but when I run the query I just get an error:
Could not find a field named 'contributors.contributor6.firstName' in the schema.
despite the fact that I have 1-5.Jason
11:05 PMGreg
11:06 PM1
Typesense
Indexed 3011 threads (79% resolved)
Similar Threads
Defining Nested JSON Schema for Querying
Greg struggled in defining a schema for querying a JSON object with nested fields. Jason offered solutions, with the final resolution involving the use of "object" as a field type for the contributors in the schema.
Issue with Dynamic Nested Field Type in TS Collection Schema
Justin encountered an issue with dynamic nested fields not showing as `float`. Jason suggested reproducing the error with a snippet, while Kishore Nallan was tagged for assistance.
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.