Skip to content

Customizing Magento 2.3.4 Search to Include Product ‘Position’ from Categories in Result Sorting

I’m working with a Magento 2.3 store and looking to customize the search result logic – fulltext search. Specifically, I want the search results to consider the “Position” attribute of products, which is set in Admin -> Catalog -> Categories -> Product in Categories.

enter image description here

Currently, our store uses the default Magento search functionality. I’m unsure how to proceed with integrating the “Position” attribute into the search results sorting.

Has anyone implemented something similar or can provide guidance on where to start with this customization? Are there specific classes or methods I should be looking at? Any help or pointers would be greatly appreciated!