HI everyone, I am trying to use nested array searc...
# community-help
v
HI everyone, I am trying to use nested array search as mentioned in the docs here https://typesense.org/docs/29.0/api/search.html#filter-parameters under
Filtering Nested Arrays of Objects:
. Howver, when I use the following filter by:
Copy code
variants.{ageGroup := [`4-6 Y`] && availability := `IN_STOCK`}
typesense takes very long to respond anything and eventually times out. Our typesense version is v29, we are on typesense cloud. The cluster id is
f1kdzbg6o7i5n2sxp
. here's the entire curl for reference:
Copy code
curl --location --globoff 'https://f1kdzbg6o7i5n2sxp-1.a1.typesense.net/collections/includ_products/documents/search?q=*&query_by=searchText0%2CsearchText1%2CsearchText2&filter_by=variants.{ageGroup%20%3A%3D%20[%604-6%20Y%60]%20%26%26%20availability%20%3A%3D%20%60IN_STOCK%60}' \
--header 'x-typesense-api-key: ••••••'
Please let me know if I am doing anything wrong or how I can use this feature. Thank you.
k
The nested array search currently relies on document values fetched from disk so that might not be efficient enough for larger datasets. We are exploring ways to add an index for this operation.
v
Oh okay, thank you for answering. Could you indicate this somewhere in the documentation as well?
k
It's not documented yet because it's a new feature and we are just seeing this particular hotspot showing up.
👍 1