79598538

Date: 2025-04-29 14:00:06
Score: 0.5
Natty:
Report link

After a few days of digging and a few questions to ChatGPT I got the right answer. The problem was in synchtonizxation. Here is the code to fix it:

public async Task<ArticleElastic> SaveAsync(ArticleElastic entity)
{
    await _elasticsearchClient.CreateAsync(entity, i => i.Id(entity.Id).Index(IndexName).Refresh(Refresh.True));
    return entity;
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: waifu_anton