Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TermsSetCondition

返回在提供的字段中包含最小精确术语数量的文档。

example

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")

Hierarchy

  • TermsSetCondition

Indexable

[name: string]: { boost?: number; minimum_should_match_field?: string; minimum_should_match_script?: Script; terms: string[] }

name:希望查询的字段名

  • Optional boost?: number

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

  • Optional minimum_should_match_field?: string

    minimum_should_match_field:包含返回文档所需的匹配术语数的数字字段。

  • Optional minimum_should_match_script?: Script

    minimum_should_match_script:包含返回文档所需匹配术语数的自定义脚本。

  • terms: string[]

    terms:在对应字段中希望查询到的术语数组