All Products
Search
Document Center

:first_phase_score

Last Updated:Sep 09, 2021

Feature function

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 statements to conduct complex sorts.

first_phase_score: returns the score that is calculated by using a rough sort expression.

1.Syntax:

first_phase_score()

2.Parameter:

None.

3.Return value:

float

4.Scenario

Scenario 1

The rough sort expression is exact_match_boost(). To implement a fine sort, you can use two expressions exact_match_boost() and text_relevance(title) with a weight ratio of 3:1.

You can also use the following one expression to implement a fine sort: first_phase_score()*0.01*3+text_relevance(title). In this case, the first_phase_score feature function is used to reduce computing workloads and improve search performance.

5.Note:

  • If a query analysis involves multiple OR logical operations, the number of OR logical operations and the number of retrieved documents have major impacts on the performance of the query analysis. You must test and optimize the sort expressions based on the requirements of actual scenarios.