-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Catalog search randomized results #9020
Comments
This happens because MySQL randomly returns documents which weights are the same. For example, But if the search is more specific like Duffle Bag . What Magento could do here is to add additional sorting by entity_id, so all documents (read products) with the same weight would be sorted by product_id as well.
instead of have something like:
What @wicho91 you could do now, not changing Core code is to pluginize
with afterPlugin and add ordering which I mentioned above. It's pretty easy to do, because current method returns $select object. |
Hello @maghamed thank you for the detailed response, i've just changed this part of the code. Im fairly new to web development as i spent 2+ years in desktop development. So will look into jQuery afterPlugin because im really blank here. But thank you again for the awesome help! Ill keep posted! |
Hi @wicho91 - could you put in a PR for this? Thanks! |
@wicho91 I meant not jQuery plugins, because jQuery is front-end JavaScript framework, but Magento Plugins, which is extension mechanism provided by Magento Framework. You can read the documentation of how Plugins could be used following the link above. You are welcome to prepare Pull Request for Core changes. |
@maghamed Even beter. You've guide me the correct way. I'll dig deep into this. For me it's a pretty and obvious need to have consistent information. Thank you so much! |
i am working on this |
I am not able to reproduce this issue in Version 2.2 , Following are the steps I had taken. a) Created 7 products from backend Note: |
I am seeing this issue still in 2.2.1, though sometimes it will take several refreshes for it to become apparent. I see that this is marked as being done in 2.3 develop, but can't find the changed files. Does anyone know what files were changed so it could be manually patched? |
…fix-06202024 Cia 2.4.8 beta1 develop bugfix 06202024
Catalog results from a search within magento 2.1.1 appear to be randomized when expected to be the same ,even with page refresh or page navigation. There's other isue related to this one (4132) that appear to be an extension problem, but in this case i contacted the template creator and they told me this:
So, appears not to be an extension related problem.
Preconditions
Steps to reproduce
Expected result
Actual result
Result in this GIF. I'm refreshing the page, and as you can see different order for results.
https://gifyu.com/image/SoU6
The text was updated successfully, but these errors were encountered: