Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

MinimumShouldMatch

MinimumShouldMatch: { high_freq?: string; low_freq?: string }

Type declaration

  • Optional high_freq?: string
  • Optional low_freq?: string

PrefixCondition

PrefixCondition: {} | {}

返回在提供的字段中包含特定前缀的文档。

example

import * as es from 'es' 
let client=es.newClient('axis_esClient')
let prefix: es.PrefixCondition = {
    "user.id": {
         "value": "ki"
    }
}
let querydsl:es.Query={
    "prefix":prefix
}
let cnt = client.updateByQuery("indexName", querydsl, "newScript")

Query

Query: {}

build query.合法的value为xxxCondition,key为condition的小驼峰命名

Type declaration

  • [key: string]: any

Script

Script: { lang?: string; params?: string; source: string }

Type declaration

  • Optional lang?: string

    lang:脚本编写的语言。

  • Optional params?: string

    parmas:脚本的参数

  • source: string

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

TermCondition

TermCondition: {} | {}

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

example

import * as es from 'es' 
let client=es.newClient('axis_esClient')
let term: es.TermCondition = {
  "user": {
      "value": "kimchy",
      "boost": 2.0
  }
}
let querydsl:es.Query={
    "term":term
}
let cnt = client.updateByQuery("indexName", querydsl, "newScript")

TermsLookUpQuery

TermsLookUpQuery: { id?: string; index?: string; path?: string; routing?: string; type?: string } | string[] | string | number

返回在提供的字段中包含一个或多个精确术语的文档。

Functions

newClient

  • create elasticsearch client

    example
    import * as es from 'es';
    let client = es.newClient('es_connector_instance')
    // client can be use for ES operations
    

    Parameters

    • name: string

      the name of connector instance

    Returns ESClient