Querying Nested Fields in Array Using Filters
TLDR Todd asked about using wildcards for array style searches in a nested field. Jason responded that using filter_by: topLevelField.nestedField:=5
should work. Todd confirmed that the solution was effective.

Jul 03, 2023 (2 months ago)
Todd
08:22 PMFor example, if I have this schema:
const schema: CollectionFieldSchema[] = [
{
name: 'topLevelField',
type: 'object[]',
facet: true,
},
{
facet: true,
name: 'topLevelField.nestedField',
type: 'int32',
},
];
And I have an entry with this shape:
{ topLevelField: [{ nestedField: 3 }, { nestedField: 5}]}
How can I filter that 5 is in the nestedField list?
Jason
08:25 PMTypesense doesn’t support wild-cards in filter values
> How can I filter that 5 is in the nestedField list?
filter_by: topLevelField.nestedField:=5
should work…
Jason
08:25 PMTodd
08:26 PM
Todd
08:41 PM
Typesense
Indexed 2764 threads (79% resolved)
Similar Threads
Usage and Modification of Dynamic Routes in Typesense Documents
Ethan needed a way to perform exact queries through two fields in Typesense documents. Kishore Nallan demonstrated its possibility using the "filter_by". An issue was resolved via recommending that fields in 'query by' should be a string type.
Cold Start Problem with Dynamic Collections
Adrian reported cold start issues with dynamic collections. Jason suggested using wildcard `*` for query_by parameters, upgrading to `0.25.0.rc34`, and clarified conventions. Adrian's issues were resolved but they reported a limitation that will potentially be addressed.

Updating Collections Strategy and Faceting New Field
Nithin asked about strategies for updating collections and faceting new fields. Kishore Nallan suggested creating another collection, indexing in the background and using aliases to switch live traffic over, and shared details about the upcoming release.