Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lucene indexation : content items not indexed if created before index is created #5466

Open
Skrypt opened this issue Feb 5, 2020 · 4 comments · May be fixed by #16371
Open

Lucene indexation : content items not indexed if created before index is created #5466

Skrypt opened this issue Feb 5, 2020 · 4 comments · May be fixed by #16371
Assignees
Milestone

Comments

@Skrypt
Copy link
Contributor

Skrypt commented Feb 5, 2020

When we create a Lucene index after having creating some content items it won't index them because they did not get added to the IndexingTask table which gets added to the database only if you enable the Lucene module. So to repro.

Create some content items.
Enable the Lucene feature.
Create a Lucene Index.
Hit rebuild index.

The content items won't be indexed. So we should add a new button on the Index List to resync the content items that should be added to the IndexingTask table. This button could also flush the ContentItems that should not be there at the same time.

@Skrypt Skrypt added this to the 1.0 milestone Feb 5, 2020
@Skrypt Skrypt self-assigned this Feb 5, 2020
@sebastienros
Copy link
Member

It should be a setting page in the indexing module, not per index or in lucene. The action could be as simple as iterate over all content items and create an index task record for it, then remove the previous taks records. All in batches.

@sebastienros sebastienros modified the milestones: 1.0, 1.0.x Feb 6, 2020
@MaxGasta
Copy link

MaxGasta commented Aug 27, 2020

Hello, v.1.0.0-rc2-14196
I'm having exactly this issue. Some way to fix it? Thanks

@Skrypt
Copy link
Contributor Author

Skrypt commented Mar 9, 2021

TODO : Test this query

INSERT INTO IndexingTask VALUES (
(SELECT ContentItemId, CreatedUtc, 0 FROM ContentItemIndex WHERE ContentItemId NOT IN (SELECT ContentItemId FROM IndexingTask) AND (ContentItemIndex.Published = 1 OR ContentItemIndex.Latest = 1))
)

AndreySurkov added a commit to AndreySurkov/OrchardCore that referenced this issue Jun 25, 2024
@AndreySurkov
Copy link
Contributor

Hi, I see that this issue still open, and I faced with similar situation. I created PR (#16371) that will fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants