magento2new
magento2new

Reputation: 517

Invalid Magento Search result

Searching Magento with fulltext search engine and like method , it will store results in catalogsearch_fulltext table in "data_index" field where it stores value in the format like each searchable attribute is separated with |. e.g

3003|Enabled|None||Product name|1.99|yellow|0

here it store sku,status,tax class, product name , price ,color etc etc It stores all searchable attribute value.

Now the issue is for Configurable product , it will also store the associated products name ,price ,status in the same field like

3003|Enabled|Enabled|Enabled|Enabled|None|None|None|None|Product name|Product name|associted Product name1|associted Product name2|associted Product name3|1.99|2.00|2.99|3.99|yellow|black|yellow|green|0|0|0|0

So what happen is if i search for any word from associated product, it will also list the main configurable product as it has the word in its "data_index" field.

Need some suggestion how can i avoid associated products being included in data_index, So that i can have perfect search result.

thanks

Upvotes: 0

Views: 561

Answers (1)

Nathaniel Wendt
Nathaniel Wendt

Reputation: 1202

We are looking into our search as well and it has been surprising to see the inefficiencies included in the fulltext table. We have some configurable products as well that have MANY variations and their population in the fulltext search is downright horrendous.

As for solutions, I can only offer my approach to fix the problem (not completed: but rather in the process).

I am extending Magento to include an event listener to the process of indexing the products (Because catalog search indexing is when the fulltext database is populated). Once that process occurs, I am writing my own module to remove duplicate entries from the associated products and also to add the functionality of adding additional search keyword terms as populated from a CSV file.

This should effectively increase search speed dramatically and also return more relevent search results. Because as of now, configurable products are getting "search bias" in the search results.

This isn't so much of an answer as a comment, but it was too lengthy to fit in the comments but I thought this might be beneficial to you. Once I get my module working, if you would like, I can possibly give you directions on how you could implement a similar module yourself.

Hope that helped (if only for moral support in magento's search struggle)

Upvotes: 0

Related Questions