Before I’ve done a boost for specific categories. So in the CMS websitesettings you choose some categories that we add boost to when the index is created.
Now we hade a request to add the same logic to Brands.
So my question is, it’s no specific field for this in the CMS. Is my only solution to build a custom field for this and boost it in the same way we boost categories.
Or is there a better way? Am I forgetting something?
I think I misunderstand your question first but now…
You need to create a settings page where you can set a boost-level for each brand that can be used when the product will be indexed. During indexing you will fetch the brand boost level and combine that with the boost level of the category.
You may add a field on the brand page in the CMS that contains the boost, but I think that will be too slow in lookups during indexing so the indexing queue not will be processed as fast that can be needed.
Yes, the cms solution seems to be a bad idea.
I like your idea. Do you see any problems to add this to our solution, I’m mainly thinking about performance
No, it should not be a problem performance wise to add this into the solution. But remember to measure before and after the change to see how long time the extra work will do and if that code get any “hot path” where improvement easily can be implemented.