Interface CombinedFieldsCondition

组合字段查询,在多个字段中查询指定字段。

Example


import * as es from 'es'
let client=es.newClient('axis_esClient')
let combinedField: es.CombinedFieldsCondition = {
"query": "database systems",
"fields": ["title", "abstract", "body"],
"operator": "and"
}
let querydsl:es.Query={
"combined_fields":combinedField
}
let cnt = client.updateByQuery("indexName", querydsl, "newScript")
interface CombinedFieldsCondition {
    auto_generate_synonyms_pharse_query?: boolean;
    fields: string[];
    minimum_should_match?: string;
    operator?: string;
    query: any;
    zero_terms_query?: string;
}

Properties

auto_generate_synonyms_pharse_query?: boolean

auto_generate_synonyms_phrase_query: 自动为多术语同义词创建匹配短语查询。默认为true.

fields: string[]

fields: 搜索的字段列表,字段类型必须为text,并且具有相同的搜索分析器。

minimum_should_match?: string

minimum_should_match: 要返回的文档必须匹配的最小子句数

operator?: string

operator: AND or OR

query: any

query: 希望查询的文本。

zero_terms_query?: string

zero_terms_query: none or all