Interface RegexpCondition

返回包含与正则表达式匹配的术语的文档。

Example


import * as es from 'es'
let client=es.newClient('axis_esClient')
let regexp: es.RegexpCondition = {
"user": {
"value": "k.*y",
"flags": "ALL",
"max_determinized_states": 10000,
"rewrite": "constant_score"
}
}
let querydsl:es.Query={
"regexp":regexp
}
let cnt = client.updateByQuery("indexName", querydsl, "newScript")
interface RegexpCondition {
    [name: string]: {
        boost?: number;
        case_insensitive?: boolean;
        flags?: string;
        max_determinized_states?: number;
        name?: string;
        rewrite?: string;
        value: string;
    };
}

Indexable

[name: string]: {
    boost?: number;
    case_insensitive?: boolean;
    flags?: string;
    max_determinized_states?: number;
    name?: string;
    rewrite?: string;
    value: string;
}

name:希望查询的字段名

  • Optional boost?: number

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

  • Optional case_insensitive?: boolean
  • Optional flags?: string

    flags:正则表达式启用可选运算符。

  • Optional max_determinized_states?: number

    max_determinized_states:查询所需的最大自动机状态数。

  • Optional name?: string
  • Optional rewrite?: string

    rewrite:用于重写查询的方法。

  • value: string

    value:您希望在提供的字段中找到的术语的正则表达式