You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need Recommendations to fetch the Recommendations record but when i used GetRecommendationsAsync as inside that pass request i get error like {"message":"Index does not exist","status":404} i double check everything like index name and api key and permissions as well. So any solution.
#139
var requests = new List {
new RecommendRequest {
IndexName = l.Items[0].Name, //here is index name
ObjectID = "333434349435",
Model = "related-products",
Threshold = 10,
MaxRecommendations = 10,
QueryParameters = new Query(),
FallbackParameters = new Query()
}
};
var recommendationClient = new RecommendClient(algApplicationId, algAdminApiKey);
var res = client.GetApiKey(algAdminApiKey);
if (res.Acl.Contains("recommendation"))
{
Console.WriteLine("ok");
}
try
{
var task = Task.Run(() => recommendationClient.GetRecommendationsAsync<NewsDetail>(requests));
if (task.Wait(TimeSpan.FromSeconds(300)))
{
var response = task;
Console.WriteLine($"ObjectID: {response}");
}
else
{
throw new Exception("Request Timed out");
}
}
catch (AggregateException ex)
{
foreach (var inner in ex.InnerExceptions)
{
Console.WriteLine(inner.Message);
}
}
The text was updated successfully, but these errors were encountered:
var requests = new List {
new RecommendRequest {
IndexName = l.Items[0].Name, //here is index name
ObjectID = "333434349435",
Model = "related-products",
Threshold = 10,
MaxRecommendations = 10,
QueryParameters = new Query(),
FallbackParameters = new Query()
}
};
The text was updated successfully, but these errors were encountered: