Hi Sebastian,
I have successfully configured two Algolia rules for two different schemas.
Now, I would like to delete the record in my Algolia index whenever I DELETED
or UNPUBLISHED
a page in Squidex. How can I do this?
I’ve tried specifying the following under Schemas:
event.type == 'Published' || event.type == 'Updated' || event.type == 'Unpublished' || event.type == 'Deleted'
And the following under “Deletion”:
The above configuration gives me the following error:
{"message":"null value not allowed outside of body near line:1 column:46","status":400}
Error: {"message":"null value not allowed outside of body near line:1 column:46","status":400}
Elapsed 00:00:00.0590000.
Thanks!
This should actually be correct. I have no idea what the exception means.
This is the code. Could be a bug or so, I need to investigate that.
};
var response = await index.SaveObjectsAsync(raw, null, ct, true);
return Result.Success(serializer.Serialize(response, true));
}
else
{
var response = await index.DeleteObjectAsync(job.ContentId, null, ct);
return Result.Success(serializer.Serialize(response, true));
}
}
catch (Exception ex)
{
return Result.Failed(ex);
}
}
}
public sealed class AlgoliaContent
It was a small bug. I have fixed, but not deployed it yet.
Cool that you found the bug
Please do let me know when it’s deployed so that I can configure my rules again and try it out.
Thanks!
1 Like
Finally deployed. Sorry, it took very long.
1 Like
Thanks! Will try it out as soon as I have some time over… currently working on some other things
1 Like