Feature functions
Feature functions can be used in sort expressions. Most are supported only in fine sort expressions. You can combine various syntax and statements to create powerful sorting features.
first_phase_score: Get the final score of a rough sort expression
1. Usage:
first_phase_score()
2. Parameters:
None
3. Return value:
float
4. Scenarios:
Scenario 1:
The rough sort expression is `exact_match_boost()`. The fine sort expression is a combination of `exact_match_boost()` and `text_relevance(title)` with a weight ratio of 3:1.
Rough sort expression: `exact_match_boost()`. Fine sort expression: `first_phase_score()*0.01*3+text_relevance(title)`. Using `first_phase_score()` instead of `exact_match_boost()` in the fine sort expression reduces computation and improves retrieval performance.
5. Notes:
For queries that contain multiple OR operators, performance is significantly affected by the number of operators and the number of recalled documents. Test and optimize your queries as needed.