david buedo
05/02/2024, 11:21 AMsearch_cutoff_ms
but it does not seem to have any effect. More details on thread.david buedo
05/02/2024, 11:21 AM{
"name": "travelers",
"fields": [
{
"name": "_id",
"type": "string",
"index": true,
"optional": false
},
{
"name": "first_name",
"type": "string",
"index": true,
"optional": false
},
{
"name": "last_name",
"type": "string",
"index": true,
"optional": false
},
{
"name": "email_address",
"type": "string",
"index": true,
"optional": false
},
{
"name": "employee_id",
"type": "string",
"index": true,
"optional": true
},
{
"name": "company_id",
"type": "string",
"index": true,
"optional": true
},
{
"name": "company_group_id",
"type": "string",
"index": true,
"optional": true
}
],
"num_documents": 3685055,
"token_separators": [
"-"
]
}
An example of a typical request is:
GET /collections/travelers/documents/search?q=johnson
&query_by=_id,first_name,last_name,email_address,employee_id
&filter_by=company_group_id:=803f6614-a459-3c92-9375-fffeeeaa
&highlight_fields=none
&per_page=250
&max_candidates=4
&use_cache=false
&search_cutoff_ms=1000
And the response, where search_cutoff
was not applied and the search time is too high to be acceptable in our use case:
{
"facet_counts":[],
"found":803,
"hits":[
...
],
"out_of":3685109,
"page":1,
"request_params":{
"collection_name":"travelers",
"first_q":"johnson",
"per_page":250,
"q":"johnson"
},
"search_cutoff":false,
"search_time_ms":4063
}
I know that cutoff is not guaranteed, but I've tried different parameters, different values, and cutoff was not applied. That particular CompanyGroupId is one of the bigger ones, with around 100K travelers. Typesense version is 0.25.2
. Is there something I'm not considering? Any help is appreciated! Thanks!Harpreet Sangar
05/02/2024, 11:48 AMsearch_cutoff
is also made more reliable.david buedo
05/02/2024, 1:15 PM