Thomas Garp
11/14/2024, 10:04 PMJason Bosco
11/14/2024, 10:07 PMJason Bosco
11/14/2024, 10:07 PMThomas Garp
11/14/2024, 10:08 PMThomas Garp
11/14/2024, 10:23 PMThomas Garp
11/14/2024, 10:25 PMq
is required."Jason Bosco
11/15/2024, 1:43 AMGET /presets
?Thomas Garp
11/15/2024, 5:36 AMJason Bosco
11/15/2024, 6:09 AMJason Bosco
11/15/2024, 6:11 AM{
"name": "{preset_name}",
"value": {
"collection": "{collection_name}",
"prioritize_exact_match": "false",
"query_by": "name,Brand,Categories,Color",
"query_by_weights": "1,1,1,1",
"sort_by": "_text_match:desc,raptor_rank:desc,SpecialPrice:asc",
"split_join_tokens": "always"
}
}
And then you can use inside a multi_search request like this:
curl 'https:// ${API_URL}/multi_search' \
--header 'X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}' \
--header 'Content-Type: application/json' \
--data '
{
"searches": [
{
"q": "surf",
"preset": "{preset_name}"
}
]
}
'
Thomas Garp
11/15/2024, 8:02 AM