返回在提供的字段中包含最小精确术语数量的文档。
import * as es from 'es'let client=es.newClient('axis_esClient')let termsSet: es.TermsSetCondition = { "programming_languages": { "terms": ["c++", "java", "go"], "minimum_should_match_field": "required_matches" }}let querydsl:es.Query={ "terms_set":termsSet}let cnt = client.updateByQuery("indexName", querydsl, "newScript") Copy
import * as es from 'es'let client=es.newClient('axis_esClient')let termsSet: es.TermsSetCondition = { "programming_languages": { "terms": ["c++", "java", "go"], "minimum_should_match_field": "required_matches" }}let querydsl:es.Query={ "terms_set":termsSet}let cnt = client.updateByQuery("indexName", querydsl, "newScript")
name:希望查询的字段名
Optional
boost:浮点数,用作与筛选器查询匹配的每个文档的常量相关性分数。
minimum_should_match_field:包含返回文档所需的匹配术语数的数字字段。
minimum_should_match_script:包含返回文档所需匹配术语数的自定义脚本。
terms:在对应字段中希望查询到的术语数组
返回在提供的字段中包含最小精确术语数量的文档。
Example