Closed mariojsnunes closed 5 months ago
If you are using the ContentManager to update your content item it should re-index properly. Are you updating the content item with the OrchardCore.Content API or is it done from a server-side ContentHandler?
If you are using the ContentManager to update your content item it should re-index properly. Are you updating the content item with the OrchardCore.Content API or is it done from a server-side ContentHandler?
It's server-side code, where we use IContentManager.
Yeah and it is re-indexed most of the time, the issue happens rarely...
Can you check if there is enough logging in the code where the indexing is done, and if so enable it? It might help identity the issue since there is no consistent repro.
@mariojsnunes
At least you may need to also use ValidateAsync()
.
await contentManager.UpdateAsync(contentItem);
var result = await contentManager.ValidateAsync(contentItem);
if (result.Succeeded)
{
await contentManager.PublishAsync(contentItem);
}
Hmm, here some code I'm using
var result = await contentManager.UpdateValidateAndCreateAsync(contentItem, VersionOptions.Published);
if (!result.Succeeded)
{
throw new ValidationException(string.Join(", ", result.Errors));
}
Closing due to no reply from the author.
Describe the bug
I have two Lucene Indexes:
On rare occasions, after updating an existing Article, it is only indexed on ContentManagement and disappears from the Content Index.
To Reproduce
Expected behavior
The item is indexed in both Indexes
I understand this is a tricky one, I'm posting in case this happened to someone else, or if someone has any idea what's happening.