Open cptX opened 5 months ago
Hi @cptX. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Dash. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.I agree, the search functionality from the Admin Product Grid is annoyingly limited. We've had the same issue since launching Magento 2. The frontend search with Elasticsearch more helpful, I wonder why this was never integrated into the Admin side.
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.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-11757 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@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, can you please share the code you modified? Also, How is elasticsearch related to this search? Are you trying to use elasticsearch for the admin instead of the embedded mysql search? This would be excellent if true!
@cptX https://github.com/magento/magento2/pull/38630 --> yes, there was a hook already in place but this hook was using Magento database, I swapped it to use elasticsearch now
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 situation with this work is: I have committed some changes and made a PR from them. This PR is now awaiting to be reviewed. The changes do consist in taking over the backend product full text feature and make use of elasticsearch instead.
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. Using mysql and making an OR search would imply to start all over again with different changes.
@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: This is what we currently have and I have made some comments below on this particular context:
- the admin search uses Elasticsearch to enhance a search that has the relevance and the OR search built-in This is the solution I have come up with and I add the justifications for it below:
Conclusion: If we simply choose to add an OR search and do not have relevance, we will have some results with less relevance than now at the top of the product grid. If we use ElasticSearch, we may have the concern that we use a solution that is not designed to be used for the backend. Both solutions have pros and cons and we should decide on the next step once we have confirmed these pros and cons are all understood and once we have a final idea on how to finalise this solution.
@magento run all tests
@digitalrisedorset thanks for spending time explaining the possibilities.
I'll describe my everyday needs as the eshop manager: Let's say I have many chargers for electric vehicles (check here https://electrons.gr/en/batteries/chargers) As you see the names are with this format:
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.
Hi @digitalrisedorset, can I install your module with composer? Do you have it in a repository or should I install it manually?
I have installed it and when I go to admin > products I get this error "Something went wrong with processing the default view and we have restored the filter to its original state."
Ok thanks for the update and for trying the update.
I would put the site in developer mode, then, clean the cache, clear the generated folder and then try bin/magento setup:upgrade
before doing anything in the backend. If all the steps before are ok, then the backend should be fine too.
Once the backend is ok, then you can also put the site in production mode or however it was before the module was installed
@cptX I made a rehearsal of the deployment of the zip file I have sent you. Before I made the deployment of my module, I verified the admin catalog search does not return any match for the full text search with 'Erika short' (my site has the sample data installed)
I have created a folder under app/code
called Mbs
and then a folder CatalogAdminSearch
under Mbs
. Within this folder, I have added all the files from the extracted zip
I then ran bin/magento setup:upgrade
I verified the module was enabled by running bin/magento module:status
Finally, I tried the query again and verified some results appear. More importantly, I validated the product 'Erika short' was found was expected
Preconditions and environment
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