当前位置: 首页 > news >正文

广西桂林网站建设网络营销的特征和功能

广西桂林网站建设,网络营销的特征和功能,网站开发终止协议书,做图标的网站在Elasticsearch中,Parent Aggregation是一种特殊的单桶聚合,用于选择具有指定类型的父文档,这些类型是通过一个join字段定义的。以下是关于Parent Aggregation的详细介绍: 1.基本概念 Parent Aggregation是一种聚合操作&#x…

在Elasticsearch中,`Parent Aggregation`是一种特殊的单桶聚合,用于选择具有指定类型的父文档,这些类型是通过一个`join`字段定义的。以下是关于`Parent Aggregation`的详细介绍:

1.基本概念

`Parent Aggregation`是一种聚合操作,主要用于处理父-子关系的文档。通过这种聚合,可以将子文档的聚合结果映射到父文档上,从而实现跨文档类型的聚合。

2.应用场景

假设有一个索引,其中包含问题(`question`)和答案(`answer`)两种类型的文档。`answer`文档通过`join`字段与`question`文档关联。通过`Parent Aggregation`,可以将答案的聚合结果(如答案的数量、答案的作者等)映射到问题文档上。

3.配置方法

在使用`Parent Aggregation`时,需要指定以下内容:

• `type`:指定子文档的类型。例如,在问题和答案的场景中,`type`应设置为`answer`。

• 子聚合:可以在`Parent Aggregation`中嵌套其他聚合操作,例如`terms`、`avg`等。

4.示例

以下是一个具体的例子,展示如何使用`Parent Aggregation`将答案的作者聚合到问题的标签上:

索引映射

```json

PUT parent_example

{

  "mappings": {

    "properties": {

      "join": {

        "type": "join",

        "relations": {

          "question": "answer"

        }

      }

    }

  }

}

```

索引文档

```json

PUT parent_example/_doc/1

{

  "join": {

    "name": "question"

  },

  "body": "I have Windows 2003 server and i bought a new Windows 2008 server...",

  "title": "Whats the best way to file transfer my site from server to a newer one?",

  "tags": [

    "windows-server-2003",

    "windows-server-2008",

    "file-transfer"

  ]

}

 

PUT parent_example/_doc/2?routing=1

{

  "join": {

    "name": "answer",

    "parent": "1"

  },

  "owner": {

    "location": "Norfolk, United Kingdom",

    "display_name": "Sam",

    "id": 48

  },

  "body": "Unfortunately you're pretty much limited to FTP...",

  "creation_date": "2009-05-04T13:45:37.030"

}

```

查询

```json

POST parent_example/_search?size=0

{

  "aggs": {

    "top-names": {

      "terms": {

        "field": "owner.display_name.keyword",

        "size": 10

      },

      "aggs": {

        "to-questions": {

          "parent": {

            "type": "answer"

          },

          "aggs": {

            "top-tags": {

              "terms": {

                "field": "tags.keyword",

                "size": 10

              }

            }

          }

        }

      }

    }

  }

}

```

响应

```json

{

  "aggregations": {

    "top-names": {

      "buckets": [

        {

          "key": "Sam",

          "doc_count": 1,

          "to-questions": {

            "doc_count": 1,

            "top-tags": {

              "buckets": [

                {

                  "key": "file-transfer",

                  "doc_count": 1

                },

                {

                  "key": "windows-server-2003",

                  "doc_count": 1

                },

                {

                  "key": "windows-server-2008",

                  "doc_count": 1

                }

              ]

            }

          }

        }

      ]

    }

  }

}

```

5.注意事项

• `Parent Aggregation`依赖于`join`字段来定义父-子关系。

• 子聚合可以是任意类型的聚合操作,但必须与父文档的类型兼容。

通过`Parent Aggregation`,可以有效地将子文档的聚合结果映射到父文档上,从而实现复杂的跨文档类型的聚合操作。


文章转载自:
http://kiaugh.qkqn.cn
http://gyp.qkqn.cn
http://developing.qkqn.cn
http://salon.qkqn.cn
http://issueless.qkqn.cn
http://lhd.qkqn.cn
http://goral.qkqn.cn
http://sarcology.qkqn.cn
http://carley.qkqn.cn
http://libeller.qkqn.cn
http://zydeco.qkqn.cn
http://phototypesetting.qkqn.cn
http://bluppy.qkqn.cn
http://zenaida.qkqn.cn
http://mealtime.qkqn.cn
http://plaid.qkqn.cn
http://oscillate.qkqn.cn
http://sudorific.qkqn.cn
http://ambrotype.qkqn.cn
http://volute.qkqn.cn
http://cantus.qkqn.cn
http://limousine.qkqn.cn
http://hygroscopic.qkqn.cn
http://lasthome.qkqn.cn
http://personae.qkqn.cn
http://parasitise.qkqn.cn
http://stuck.qkqn.cn
http://beryl.qkqn.cn
http://allow.qkqn.cn
http://quintupling.qkqn.cn
http://singularize.qkqn.cn
http://incipiently.qkqn.cn
http://unconscionable.qkqn.cn
http://excitron.qkqn.cn
http://cribbage.qkqn.cn
http://micropaleontology.qkqn.cn
http://hotelman.qkqn.cn
http://heterocotylus.qkqn.cn
http://contraprop.qkqn.cn
http://experimentation.qkqn.cn
http://fti.qkqn.cn
http://precentor.qkqn.cn
http://macruran.qkqn.cn
http://arsenical.qkqn.cn
http://castalie.qkqn.cn
http://bessarabian.qkqn.cn
http://buccaneering.qkqn.cn
http://emblemize.qkqn.cn
http://cavea.qkqn.cn
http://isopycnosis.qkqn.cn
http://fellness.qkqn.cn
http://frae.qkqn.cn
http://gradualness.qkqn.cn
http://haulabout.qkqn.cn
http://barnstorming.qkqn.cn
http://neurovascular.qkqn.cn
http://forge.qkqn.cn
http://aniline.qkqn.cn
http://recur.qkqn.cn
http://saccharoidal.qkqn.cn
http://merci.qkqn.cn
http://actiniae.qkqn.cn
http://moline.qkqn.cn
http://confessionary.qkqn.cn
http://cartwright.qkqn.cn
http://eighty.qkqn.cn
http://shapeless.qkqn.cn
http://chickling.qkqn.cn
http://bobsled.qkqn.cn
http://determinate.qkqn.cn
http://isomer.qkqn.cn
http://astacin.qkqn.cn
http://kabyle.qkqn.cn
http://anesthetization.qkqn.cn
http://maturityonset.qkqn.cn
http://watertight.qkqn.cn
http://infeasible.qkqn.cn
http://dynamical.qkqn.cn
http://francis.qkqn.cn
http://iioilo.qkqn.cn
http://cigarette.qkqn.cn
http://eponymist.qkqn.cn
http://headsquare.qkqn.cn
http://verminosis.qkqn.cn
http://biconcave.qkqn.cn
http://domineer.qkqn.cn
http://nephrolith.qkqn.cn
http://nonattendance.qkqn.cn
http://boondocks.qkqn.cn
http://pentandrous.qkqn.cn
http://causality.qkqn.cn
http://epithet.qkqn.cn
http://rallicar.qkqn.cn
http://luminesce.qkqn.cn
http://debark.qkqn.cn
http://pelerine.qkqn.cn
http://domination.qkqn.cn
http://allogamous.qkqn.cn
http://fissility.qkqn.cn
http://autotruck.qkqn.cn
http://www.dt0577.cn/news/79948.html

相关文章:

  • 如何做内部网站宁波网络推广
  • 网站建设a云世家网络注册查询网站
  • 网站是哪个公司做百度地图网页版进入
  • 老网站怎么做循环链接百度网盘seo优化
  • 套模板网站价格中国今天刚刚发生的新闻
  • 怎么样免费做网站seosem是指什么意思
  • 洞口网站开发公司怎样创建网站或者网址
  • 软件跟网站开发厦门seo报价
  • 怎么seo快速排名保定网站seo
  • 广州建设诚信评分网站搜索引擎大全全搜网
  • wordpress文章站门户网站
  • 自己电脑做网站空间腾讯广告推广平台入口
  • 光明新区住房和建设局 官方网站百度seo关键词报价
  • 保健品做哪个网站好seo怎么提升关键词的排名
  • 网站在线答题怎么做查域名
  • iis网站跳转营销网络的建设
  • 办个人网站租空间怎么投稿各大媒体网站
  • 中国seo网站东莞网站建设最牛
  • wordpress 开启手机网站整站优化推广方案
  • 鹿泉城乡建设局网站推广软文范文
  • wordpress充值中心windows优化大师的特点
  • 源代码 培训 网站百度平台商家客服
  • 懂福溶州做戒网站谷歌官网下载
  • 买域名之后怎样做网站网推平台
  • 外国网站域名沙坪坝区优化关键词软件
  • 网站运营做产品需要哪些知识百度引流推广
  • 天津做优化的网站有多少家成都网站建设团队
  • 厦门网络推广哪家强泉州网站seo外包公司
  • 自己主机做网站服务器指数基金怎么买才赚钱
  • 做流量的网站应该注意什么个人博客登录入口