All Products
Search
Document Center

OpenSearch:Rank

Last Updated:Oct 10, 2023

Overview

This topic describes the Rank class and its methods.

Constructor

This constructor requires no parameter.
Rank()

setFirstRankName

Method definition

Sets a name for the rough sort expression to be used.
Rank    setFirstRankName(String firstRankName)

Parameter description

Parameter

Type

Description

firstRankName

String

The name of the rough sort expression to be used.


getFirstRankName

Method definition

Obtains the specified name of the rough sort expression to be used.
String    getFirstRankName()

Return value

  • The specified name of the rough sort expression to be used. Type: String.


setSecondRankName

Method definition

Sets a name for the fine sort expression to be used.
Rank    setSecondRankName(String secondRankName)

Parameter description

Parameter

Type

Description

secondRankName

String

The name of the fine sort expression to be used.


getSecondRankName

Method definition

Obtains the specified name of the fine sort expression to be used.
String    getSecondRankName()

Return value

  • The specified name of the fine sort expression to be used. Type: String.


setReRankSize

Method definition

Specifies the number of documents to be sorted based on the fine sort expression. This parameter corresponds to the rerank_size parameter of the Config class.
Rank    setReRankSize(int reRankSize)

Parameter description

Parameter

Type

Required

Valid values

Default value

Description

rerank_size

int

No

[0,2000]

200

The number of documents to be sorted based on the fine sort expression.


getReRankSize

Method definition

Obtains the specified number of documents to be sorted based on the fine sort expression.
int    getReRankSize()

Return value

  • The specified number of documents to be sorted based on the fine sort expression. Type: int.