OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Populate IndexingTask table after creation (#5466)

Open AndreySurkov opened this issue 1 year ago • 8 comments

Proposed solution to fix #5466. When OrchardCore.Indexing module enabled, IndexingTask table should contain record for each ContentItem. But if I enable OrchardCore.Indexing module when system already has content items, i need to republish them to make them available for indexing. That is not so simple if you have hundreds of items. This change will populate table with required data during creation. Or in case if system already has gaps in IndexingTask table it will be fixed during migration from version 1 .

AndreySurkov avatar Jun 25 '24 20:06 AndreySurkov

@Skrypt is this something you could review?

Piedone avatar Jul 02 '24 17:07 Piedone

I would rather have a button in the admin UI to execute that same SQL Query. Else, we never know when someone will disable the OrchardCore.Indexing feature and enable it back a couple days later. Then you will miss all the documents published in these days and will have no way to execute this Query again. Also, it should insert only records that are not already there to not create duplicates.

Skrypt avatar Jul 02 '24 19:07 Skrypt

@Skrypt It is a good point to have ability to run it in any time. Do you have any suggestion where this button should be placed?

As for "Also, it should insert only records that are not already there to not create duplicates." - it is already covered in this PR.

AndreySurkov avatar Jul 03 '24 06:07 AndreySurkov

I think you will need to create a new configuration page in the admin UI.

(admin menu) Configurations --> Indexing

New drivers and views in the OrchardCore.Indexing module.

We need to keep the migration code but we should extract the scoped db request code into something like a Mediator command.

@sebastienros Are we using anything like https://github.com/jbogard/MediatR in OC yet. Do you have a preference over a specific library? I know .NET 9 should have it's own thing too. Is it usable in OC right now?

Skrypt avatar Jul 03 '24 13:07 Skrypt

This pull request has merge conflicts. Please resolve those before requesting a review.

github-actions[bot] avatar Aug 14 '24 13:08 github-actions[bot]

Do you have any suggestion where this button should be placed?

This can be kept automatic if you implement a different event than migrations. There is an event to detect a feature is enabled (this is what migrations use).

sebastienros avatar Aug 15 '24 17:08 sebastienros

This pull request has merge conflicts. Please resolve those before requesting a review.

github-actions[bot] avatar Aug 16 '24 20:08 github-actions[bot]

It seems that this pull request didn't really move for quite a while. Is this something you'd like to revisit any time soon or should we close? Please comment if you'd like to pick it up.

github-actions[bot] avatar Oct 15 '24 20:10 github-actions[bot]

Closing this pull request because it has been stale for very long. If you think this is still relevant, feel free to reopen it.

github-actions[bot] avatar Oct 30 '24 20:10 github-actions[bot]