All Products
Document Center


Last Updated:Sep 09, 2021

Feature functions

You can use feature functions in sort expressions. Most feature functions can be used only in fine sort expressions. You can combine various syntax and clauses to perform complex sorts. The fields that you reference in parameters of feature functions must be configured as index or attribute fields based on the description of each function.

popularity: returns the popularity score of a commodity. The score indicates the popularity of the commodity.




model_name: the name of the popularity model. You can create popularity models based on your business requirements. For more information, see Popularity models.

3.Return value:
The return value is of the FLOAT type. Valid values: [0,1]. A greater value indicates higher popularity.
Scenario 1: Create and train a popularity model, and then use this feature function together with another feature function in a fine sort expression to calculate the scores of commodities. For more information about popularity models, see Popularity models. text_relevance(title)*3+popularity(model_name)
5.Usage notes:
This function must be used together with a popularity model. For more information about popularity models, see Popularity models.