Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HasParentCondition

返回与查询条件匹配的父文档的子文档

example

import * as es from 'es' 
let client=es.newClient('axis_esClient')
let hasParent: es.HasParentCondition = {
    parent_type: "parent",
    query: {
        "term": {
            "tag": {
                "value": "Elasticsearch"
             }  
         }
    }
}
let querydsl:es.Query={
    "has_parent":hasParent
}
let cnt = client.updateByQuery("indexName", querydsl, "newScript")

Hierarchy

  • HasParentCondition

Index

Properties

Optional boost

boost: number

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

Optional ignore_unmapped

ignore_unmapped: boolean

ignore_unmapped:指示是否忽略未映射parent_type并且不返回任何文档而不返回错误。

parent_type

parent_type: string

parent_type: 关联关系中父文档的类型

query

query: Query

query:查询父文档的条件语句

Optional score

score: boolean

score:指示匹配父文档的相关性分数是否聚合到其子文档中。