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.
timeliness: returns the timeliness score that indicates how new a document is
pubtime: the field whose timeliness is to be evaluated. The field must be of INT32 or INT64 type. Unit: seconds.
The return value is of the FLOAT type. Valid values: 0 to 1. A greater value indicates better timeliness. If the value of the field is later than the current time, 0 is returned.
Scenario 1: Use the create_timestamp field in a fine sort expression or the
timeliness(create_timestamp) function in a rough sort expression to calculate the timeliness score of a document.
The pubtime field must be configured as an attribute field.
You can use this feature function in both fine and rough sort expressions.