简体   繁体   中英

SOLR popularity field based on other fields

I want to sort my solr search results based on popularity.

We need to compose the popularity by combining two custom fields: ranking and release date with a formula such as (ranking * release date). This popularity needs be precomputed and put in a separate index.

Can anyone help on how this can be done?

Regards.

You can calculate the field at client side and index it as a separate field in Solr.
You can use Function Queries as well. Check product which will allow you to use product of two fields and sort on that value

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM