提升所选文档的排名,使其高于与给定查询匹配的文档。
import * as es from 'es'let client=es.newClient('axis_esClient')let pinned: es.PinnedCondition = { ids: ["1", "4", "100"], organic: { "match": { "description": "iphone" } }}let querydsl:es.Query={ "pinned":pinned}let cnt = client.updateByQuery("indexName", querydsl, "newScript") Copy
import * as es from 'es'let client=es.newClient('axis_esClient')let pinned: es.PinnedCondition = { ids: ["1", "4", "100"], organic: { "match": { "description": "iphone" } }}let querydsl:es.Query={ "pinned":pinned}let cnt = client.updateByQuery("indexName", querydsl, "newScript")
Optional
ids:文档id数组
organic:用于对文档进行排名的任何查询选择
提升所选文档的排名,使其高于与给定查询匹配的文档。
Example