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

Only use advanced pagination for supported indexables #2665

Merged
merged 4 commits into from
Mar 28, 2022

Conversation

felipeelia
Copy link
Member

Description of the Change

Currently, the IndexHelper class will default to id ranges to paginate documents (posts, terms, users, etc.) during the sync process. As we only have support for that on posts, we default back to offset in the other Indexables.

Closes #2649

Changelog Entry

Fixed: Pagination while syncing Indexables other than Posts.

Credits

Props @felipeelia and @derringer

@felipeelia felipeelia self-assigned this Mar 18, 2022
@felipeelia felipeelia added this to the 4.1.0 milestone Mar 18, 2022
@derringer
Copy link

Hi @felipeelia, I can confirm this patch works with the term indexing:
wp elasticpress index --indexables=term --show-errors

Success: Indexing terms...
Processed terms 0 - 350 of 9656. Last Object ID: 46153
Processed terms 350 - 700 of 9656. Last Object ID: 45796
Processed terms 700 - 1050 of 9656. Last Object ID: 41467
Processed terms 1050 - 1400 of 9656. Last Object ID: 36613
Processed terms 1400 - 1750 of 9656. Last Object ID: 33241
Processed terms 1750 - 2100 of 9656. Last Object ID: 29230
Processed terms 2100 - 2450 of 9656. Last Object ID: 24333
Processed terms 2450 - 2800 of 9656. Last Object ID: 20576
Processed terms 2800 - 3150 of 9656. Last Object ID: 16735
Processed terms 3150 - 3500 of 9656. Last Object ID: 11634
Time elapsed: 0.07
Memory Usage: 98.03mb (Peak: 115.66mb)
Processed terms 3500 - 3850 of 9656. Last Object ID: 6390
Processed terms 3850 - 4200 of 9656. Last Object ID: 5997
Processed terms 4200 - 4550 of 9656. Last Object ID: 5548
Processed terms 4550 - 4900 of 9656. Last Object ID: 5113
Processed terms 4900 - 5250 of 9656. Last Object ID: 4750
Processed terms 5250 - 5600 of 9656. Last Object ID: 4390
Processed terms 5600 - 5950 of 9656. Last Object ID: 4031
Processed terms 5950 - 6300 of 9656. Last Object ID: 3663
Processed terms 6300 - 6650 of 9656. Last Object ID: 3308
Processed terms 6650 - 7000 of 9656. Last Object ID: 2947
Time elapsed: 0.06 (+-0.01)
Memory Usage: 101.46mb (Peak: 119.24mb)
Processed terms 7000 - 7350 of 9656. Last Object ID: 2586
Processed terms 7350 - 7700 of 9656. Last Object ID: 2226
Processed terms 7700 - 8050 of 9656. Last Object ID: 1866
Processed terms 8050 - 8400 of 9656. Last Object ID: 1499
Processed terms 8400 - 8750 of 9656. Last Object ID: 1129
Processed terms 8750 - 9100 of 9656. Last Object ID: 744
Processed terms 9100 - 9450 of 9656. Last Object ID: 318
Processed terms 9450 - 9656 of 9656. Last Object ID: 1
Success: Number of terms indexed: 9656
Success: Sync complete
Total time elapsed: 0.427
Success: Done!

oscarssanchez
oscarssanchez previously approved these changes Mar 28, 2022
@felipeelia felipeelia merged commit 18a0d3b into develop Mar 28, 2022
@felipeelia felipeelia deleted the fix/indexable-pagination-during-sync branch March 28, 2022 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with syncing data
3 participants