Interface ConstantScoreCondition

包装filter查询并返回相关性得分等于boost 参数值的每个匹配文档。

Example


import * as es from 'es'
let client=es.newClient('axis_esClient')
let constantScore: es.ConstantScoreCondition = {
"filter": {
term: { "user.id": "kimchy" }
}
"boost": 0.5
}
let querydsl:es.Query={
"constant_score":constantScore
}
let cnt = client.updateByQuery("indexName", querydsl, "newScript")
interface ConstantScoreCondition {
    boost?: number;
    filter: "es".Query;
}

Properties

Properties

boost?: number

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

filter: "es".Query

filter:过滤查询,任何返回的文档都必须与此查询匹配。