Interface RankFeatureCondition

根据字段的值来排序查询结果

Example


import * as es from 'es'
let client=es.newClient('axis_esClient')
let rankFeature: es.RankFeatureCondition = {
"field": "url_length",
"boost": 0.1
}
let querydsl:es.Query={
"rank_feature":rankFeature
}
let cnt = client.updateByQuery("indexName", querydsl, "newScript")
interface RankFeatureCondition {
    boost?: number;
    field: string;
    linear?: any;
    log?: any;
    saturation?: any;
    sigmoid?: any;
}

Properties

boost?: number

boost: 浮点数,用作与筛选器查询匹配的每个文档的常量相关性分数。

field: string

field:类型为rank_feature或rank_features的字段的名称

linear?: any

linear:用于根据排名特征的值提高相关性分数的field线性函数。

log?: any

log:用于根据排名特征的值提高相关性分数的field对数函数

saturation?: any

saturation:饱和函数,用于根据排名特征的值提高相关性分数field。

sigmoid?: any

sigmoid:Sigmoid 函数,用于根据排名特征的值来提高相关性分数field。