All Products
Search
Document Center

OpenSearch:FirstRank

Last Updated:Feb 20, 2023

Description

The information about a rough sort expression that is configured for a version of an OpenSearch application.

Example

{
  "name": "default",
  "description": "",
  "active": true,
  "type": "STRUCT",
  "meta": [
    {
      "attribute": "static_bm25()",
      "arg": "",
      "weight": 10
    }
  ]
}
{
  "name": "my_demo",
  "description": "",
  "active": false,
  "type": "STRING",
  "meta": "random()*100+now()"
}

Structure

Field

Type

Description

name

String

The name of the expression.

description

String

The description of the expression.

active

Boolean

Indicates whether the rough sort expression is the default one.

type

String

The type of the expression. Valid values:

STRUCT: The content of the expression is a structure. This is the default value.

STRING: The content of the expression is a custom formula.

meta

Array or String

The content of the expression.

meta field when the value of the type parameter is STRUCT

Field

Type

Description

[].attribute

String

The attribute that defines the function to be used for score calculation or the field to be searched for. For more information, see Rough sort functions.

[].arg

String

The parameters that are used by a function in the expression. For more information, see Rough sort functions.

[].weight

Number

The weight. Valid values: [-100000,100000] (excluding 0).