-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix issue with no results on other than first search pages when using elasticsearch #25379
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
Fix issue with no results on other than first search pages when using elasticsearch #25379
Conversation
… page and page size on collection to prevent no results
|
Hi @pierzakp. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
|
Few more issue details - limit and offset on collection is set after: If the |
|
Hi @pierzakp , thanks for the pull request! The fix looks valid to me, however, I would encourage @kokoc to review it as well, as the implementation of Resetting pagination looks correct approach as pagination is handled in a custom way in this case ( |
|
When can we expect a fix to be released for this? Looking at @pierzakp PR the whole SearchResultApplier class is different to the Mage2 Open Source 2.3.3 release code on my dev server. |
…/no-results-on-next-search-pages-elasticsearch
|
I have updated PR with the latest 2.3-develop branch @gaiterjones. |
…ults-on-next-search-pages-elasticsearch
|
Hi @sivaschenko, thank you for the review.
|
sivaschenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pierzakp could you please cover the changed functionality with a test
…page size and current page are reset
|
@sivaschenko phpunit test added. |
sivaschenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the unit test @pierzakp , can you please fix the failed static test.
|
@sivaschenko copyright has been added. |
|
Hi @sivaschenko, thank you for the review. |
|
Hi @pierzakp. Thanks for collaboration. This issue already fixed in 2.3-develop. |
|
Hi @pierzakp, thank you for your contribution! |

Description (*)
Pull request introduces the changes in search results applier in elastic search module which are resetting current page and page size on collection.
It is needed because elastic search applies condition on the collection with a particular set of entity ids, w/o change introduced by PR there are no results on search pages other than first one because there is a limit and offset applied on select query.
Fixed Issues (if relevant)
Manual testing scenarios (*)
(e.entity_idIN (8357, 3524, 18671, 8360, 8390, 3971, 11213, 3527, 8387, 11393)) ORDER BY FIELD(e.entity_id,8357,3524,18671,8360,8390,3971,11213,3527,8387,11393) ASCLIMIT 10 OFFSET 10`
Questions or comments
Contribution checklist (*)