Roshni Pardeshi
Roshni Pardeshi

Reputation: 11

typesense - search data using Aliases through the API call

Earlier we have used to call the typesense API for the searching where we were using collections API. We are using typesense version v26.0. We can see the new feature Aliases and we have created one as well but we could not found any API documentations where we can use aliases for searching the data/documents.

We have tried below code but still no luck. However we are getting "Not Found" response from the typesense.

curl -X GET "https://something-1.a1.typesense.net:443/aliases/products/documents/search?q=cheese&query_by=sku,displayName,brand,accset,category" -H "X-TYPESENSE-API-KEY:somethinglGTUwdSQmnzv3LIm" -H "Content-Type: application/json"

Upvotes: 1

Views: 89

Answers (1)

jije
jije

Reputation: 46

There is no additional endpoint for searching data using aliases.

Just pass alias instead of collection to search and it will work

Upvotes: 0

Related Questions