All Products
Search
Document Center

:query_term_count

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.

query_term_count: returns the number of query terms after analysis

1.Syntax:

query_term_count()

2.Parameters:

None

3.Return value:

The return value is of the INT type.

4.Scenarios:

Scenario 1: Use if (query_term_count() > 10, 0.5, 1) to process queries based on the number of terms in the queries.

5.Usage notes:

  • You can use this feature function only in fine sort expressions.