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

#2737, WIP: Allow indexing attribute value with validate-number #2750

Conversation

vahonc
Copy link
Collaborator

@vahonc vahonc commented Oct 19, 2022

No description provided.

@romainruaud romainruaud added the safe to test PR can be tested label Oct 20, 2022
@romainruaud
Copy link
Collaborator

The content of the Pull request looks good to me.

So what is the result in the Elasticsearch index when indexing comma separated values ?

@vahonc
Copy link
Collaborator Author

vahonc commented Oct 20, 2022

As you expected, when the value of test attr (attr_413) is something like '200,52' this produces "200" in the Elasticsearch index.

{"index":{"_index":"magento2_default_catalog_product_20221018_111850","_type":"_doc","_id":2046}} {"entity_id":"2046","attribute_set_id":"11","type_id":"simple","sku":"24-MG04-1","has_options":false,"required_options":false,"created_at":"2022-09-21 10:24:13","updated_at":"2022-10-18 11:12:41","row_id":"2052","created_in":"1","updated_in":"2147483647","visibility":"4","price":[{"price":45.0,"original_price":45.0,"is_discount":false,"customer_group_id":0,"tax_class_id":2,"final_price":45.0,"min_price":45.0,"max_price":45.0},{"price":45.0,"original_price":45.0,"is_discount":false,"customer_group_id":1,"tax_class_id":2,"final_price":45.0,"min_price":45.0,"max_price":45.0},{"price":45.0,"original_price":45.0,"is_discount":false,"customer_group_id":2,"tax_class_id":2,"final_price":45.0,"min_price":45.0,"max_price":45.0},{"price":45.0,"original_price":45.0,"is_discount":false,"customer_group_id":3,"tax_class_id":2,"final_price":45.0,"min_price":45.0,"max_price":45.0}],"indexed_attributes":["price","name","image","url_key","activity","material","gender","category_gear","attr_413","description","color","status","tax_class_id"],"category":[{"category_id":2,"is_virtual":"false","category_uid":"Mg=="},{"category_id":42,"is_parent":true,"is_virtual":"false","name":"Test cat's","category_uid":"NDI="},{"category_id":45,"is_parent":true,"is_virtual":"false","name":"Cat C","category_uid":"NDU="}],"name":["Aim Analog Watch Test"],"image":["\/m\/g\/mg04-bk-0_1.jpg"],"url_key":["aim-analog-watch-1"],"activity":["9","17","5","11"],"option_text_activity":["Recreation","Sports","Outdoor","Gym"],"material":["44","45"],"option_text_material":["Plastic","Rubber"],"gender":["80"],"option_text_gender":["Men"],"category_gear":["86","87","90"],"option_text_category_gear":["Electronic","Exercise","Timepiece"],"attr_413":[200.0],"description":["<p>Stay light-years ahead of the competition with our Aim Analog Watch. The flexible, rubberized strap is contoured to conform to the shape of your wrist for a comfortable all-day fit. The face features three illuminated hands, a digital read-out of the current time, and stopwatch functions.<\/p>\r\n<ul>\r\n<li>Japanese quartz movement.<\/li>\r\n<li>Strap fits 7\" to 8.0\".<\/li>\r\n<\/ul>"],"color":[49],"option_text_color":["Black"],"status":[1],"option_text_status":["Enabled"],"tax_class_id":[2],"option_text_tax_class_id":["Taxable Goods"],"stock":{"is_in_stock":true,"qty":100}}

@romainruaud romainruaud merged commit 99bab61 into Smile-SA:2.10.x Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test PR can be tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants