Vamshi Aruru
09/26/2024, 7:38 PM/collections/vaaree_product_variants/documents/search?q=*&group_by=productID&query_by=searchText0%2CsearchText1%2CsearchText2&group_limit=1&per_page=1&include_fields=id
search time in the response:
"search_time_ms": 0
With sort by price:
/collections/vaaree_product_variants/documents/search?q=*&group_by=productID&query_by=searchText0%2CsearchText1%2CsearchText2&group_limit=1&per_page=1&include_fields=id&sort_by=price%3Adesc
search time in response
"search_time_ms": 91
This is very consistently 91 milliseconds. This is the most simple query I can make, returning only the id, no complex filters or sort bys. 91ms seems a lot for this search. Any idea what's happening here?Kishore Nallan
09/27/2024, 6:19 AMfound
field in response?Vamshi Aruru
09/27/2024, 6:24 AM"found": 1,
"found_docs": 61986,
"out_of": 61986,
With sort by
"found": 47856,
"found_docs": 61986,
"out_of": 61986,
Vamshi Aruru
09/27/2024, 6:24 AMKishore Nallan
09/27/2024, 6:29 AMVamshi Aruru
09/27/2024, 6:34 AMfound
is 66 and when not using sort by found is 1. I think the behaviour with sort by is correct here? We rely on found to figure out how many search results are possible for a given query, to enable pagination and what not. If found is returned as 1 and found docs returns the total number of documents matching (which would be greater than the actual results because of group by), we would have no way to determine number of products (i.e groups) matching a given query.Vamshi Aruru
09/27/2024, 6:35 AMsearch_time_ms
is 1 with and without sort byKishore Nallan
09/27/2024, 6:38 AMVamshi Aruru
09/27/2024, 6:39 AMKishore Nallan
09/27/2024, 6:39 AMVamshi Aruru
09/27/2024, 6:44 AMKishore Nallan
09/28/2024, 7:57 AMVamshi Aruru
09/28/2024, 8:01 AMKishore Nallan
09/28/2024, 10:50 AMKishore Nallan
09/28/2024, 10:56 AMsearch_time_ms: 7
-- didn't notice long latencies.Vamshi Aruru
09/28/2024, 10:58 AMvaaree_product_variants
collection with group by and sort by both? I am still seeing >90 milli seconds: "search_time_ms": 93
Kishore Nallan
09/28/2024, 10:59 AMVamshi Aruru
09/28/2024, 11:01 AMcurl --location '<baseUrl>/collections/vaaree_product_variants/documents/search?q=*&group_by=productID&query_by=searchText0%2CsearchText1%2CsearchText2&group_limit=1&per_page=1&page=1&sort_by=price%3Adesc' \
--header 'x-typesense-api-key: <apiKey>'