I'm impressed with search in core; especially when empowered with the Search Configuration module. However I'm skimming the modules in the search category & not seeing anything that allows for arbitrary result weighting, perhaps the sticky bit could be used for this, but I was looking for something more granular; like a specific content type having a specific taxonomy term would float higher in the results.


Although Search API / Apache Solr Search Integration are popular modules with more flexible control over boosting, the core Search module allows you to add custom scoring via hook_ranking().

There is a code snippet in a comment in the documentation referenced above that at least hints how to do the boosting fpr content types. Boosting on a specific taxonomy term might be a little more tricky because the scoring logic is done in the "score" key, which is effectively a SQL clause. Therefore you have to either get fancy with joining a custom table that has some of your custom scoring logic pre-calculated when the node is indexed, or you will have to add you logic directly in the SQL clause to generate it on the fly. The latter could get messy if you have a lot of conditions.


Search_api together with search_api_solr lets you do this as does apachesolr. I find search_api easier to work with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.