Interface MultiMatchCondition

基于match查询实现多字段查询。

Example


import * as es from 'es'
let client=es.newClient('axis_esClient')
let multiMatch: es.MultiMatchCondition = {
query: "this is a test",
fields: ["subject", "message"]
}
let querydsl:es.Query={
"multi_match":multiMatch
}
let cnt = client.updateByQuery("indexName", querydsl, "newScript")
interface MultiMatchCondition {
    analyzer?: string;
    boost?: number;
    cutoff_frequency?: number;
    fields?: string[];
    fuzziness?: string;
    fuzzy_rewrite?: string;
    lenient?: boolean;
    max_expansions?: number;
    minimum_should_match?: string;
    operator?: string;
    prefix_length?: number;
    query: unknown;
    rewrite?: string;
    slop?: number;
    tie_breaker?: number;
    type?: string;
    zero_terms_query?: string;
}

Properties

analyzer?: string
boost?: number

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

cutoff_frequency?: number
fields?: string[]
fuzziness?: string
fuzzy_rewrite?: string
lenient?: boolean
max_expansions?: number
minimum_should_match?: string
operator?: string

operator: And OR Or

prefix_length?: number
query: unknown
rewrite?: string
slop?: number
tie_breaker?: number
type?: string
zero_terms_query?: string