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
Magento product search in admin product grid not working correctly. No OR functionality #38587
Comments
Hi @cptX. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Dash. Thank you for working on this issue.
|
I agree, the search functionality from the Admin Product Grid is annoyingly limited. |
Hi @cptX Thanks for reproting and collaboration. Verified the issue in magento 2.4 dev instance and the issue is reproducible. Steps to reproduce
Magento product search in admin product grid not working correctly. We are not seeing results when searching with "Erika Short". Hence, confirming the issue. Please refer the attached screenshots. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-11757 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Dash. Thank you for verifying the issue. |
@magento I am working on this |
I have now committed some changes that makes the product 'Erika Running Short' appearing when using the full text search term 'Erika short'. I am yet to add tests, documentation. Although we are seeing the product as expected, I am still trying to understand how to handle the elasticsearch boost parameter to ensure the results are more sorted more intuitively |
Hi @digitalrisedorset, |
Any progress on this? Are there any practical specific steps to follow in order to have some enhanced functionality, either by the standard mysql search or by using elasticsearch? |
@cptX is the question for me? Apologies, I have joined the project recently and I may not have performed the steps you'd expect by now. |
the PR is #38634 |
Hi @digitalrisedorset, can there be any implications from your modification? Do you believe that this would be a better solution than just enabling some OR functionality? I'm afraid that with elasticsearch the results could be more broad than needed and products that are not needed could come to surface. If I want just to enable OR functionality in the existing mysql search what should I change? |
@cptX thanks for this feedback. Using elasticsearch has the benefits to reuse the elasticsearch built-in engine strategies that bring the products that are relevant to the keywords in the full text search: this is the same use experience as the frontend.
|
@cptX I have had more thoughts on how to handle this task. I will put a summary of these thoughts so that we can decide how we can move on before making any additional changes. Ideally, I’d like a confirmation of our next move by more than 2 people so that we are assured we perform some changes for which we understand the solution before its implementation - the admin uses Mysql to retrieve the products for the Catalog/Product admin filters:
- the admin search uses Elasticsearch to enhance a search that has the relevance and the OR search built-in
Conclusion: |
@magento run all tests |
@digitalrisedorset thanks for spending time explaining the possibilities. I'll describe my everyday needs as the eshop manager:
If we enable the OR functionality I can very easily type "charger 54.6V GX16" for example to find the second item. Without OR functionality I have to type ALL words up to GX16 until I have the correct item returned, in our case "Charger 54.6V 2A with GX16"! As you understand it's impossible to remember all the correct words that exist between the important keywords. So almost all my searches fail with no results. Also, if I know that the system works with OR I can use my search keywords wisely and put only the keywords that exist in the specific item I want to find, so I don't think any irrelevant items will come out. Anyway more irrelevant items are better than no returned items. So in any case I'm pretty confident the OR functionality is absolutely necessary. Now regarding irrelevant items, of course taking advantage of the elasticsearch power would be great but then I'm afraid that this indeed will bring irrelevant items. Specifically I want you to clarify if the returned items will follow exactly the same search methodology as in frontend. For the frontend search I have in every product an extra field where I write keywords, and these keywords are searchable. If these keywords are also used in adminsearch then it will indeed return many more irrelevant products. As a simpler and first step can you describe what can I do to enable just a simple OR functionality with the existing mysql implementation? At the moment I cannot do my required job. At least with the OR I will be able to do it. |
Hi @cptX , how about you give it a try to this solution that I have written. I suggest you download the file below, install it and enable it in your store and perform couple of tests. If it does not work, then we know right away that we can't go with this on Magento on a bigger scale. If it works, we might have a temporary solution and we can mature the requirements for this issue so that it addresses your needs but in a way that is usable for all Magento owners and with an implementation that is not slowing down the backend either. Disclaimer: the module is not ready for production. You may install it on a dev/test environment and perform a backup. If you believe the module is not performing well, you can disable the module, clear the cache and everything is back as normal: this module does not alter the database at all. |
Preconditions and environment
2.4.5 and 2.4.6
In admin product list let's try the following:
Let's say we have a product called "Erika Running Short".
If we search with full name the product appears in the results.
If we search for "Erika Running" the product appears.
But if we search for "Erika Short" no product appears.
In my everyday administering I search for product names or titles and I cannot remember all the words in between. So I need to put 2 words included in the title and expecting to get the corresponding products. Now I get 0 products in the product list search results when I don't put all words in between the wanted keywords.
Steps to reproduce
Open a magento instance (2.4.5 or 2.4.6) which has some products.
Let's say it has the default sample products magento 2.4.5 and 2.4.6 have.
Go to Catalog > Products
Search for "Erika Running Short". There will be several results
Search for "Erika Short". There will be no result!
Expected result
When searching for "Erika Short" I want the system to return all the products that include these 2 words in their title independently of the position these 2 words are placed in the products titles.
For example If a product has the title "Erika Running Short", it should appear when searching for "Erika Short"
Actual result
Now when searching for "Erika Short" no products appear, although there are many products available with the title "Erika Running Short"
Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: