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

社团的工商年检网站在哪里做网络平台搭建是什么意思

社团的工商年检网站在哪里做,网络平台搭建是什么意思,手机软件怎么制作,上海建设工程信息查询网按照指定的表达式对输入文档进行分类后放入指定数字的桶中#xff0c;跟$bucket不太一样#xff0c;$bucketAuto可以指定分组的数量#xff08;颗粒度#xff09;#xff0c;$bucketAuto会根据groupBy的值和颗粒度自动生成桶的边界。 语法 {$bucketAuto: {groupBy: …按照指定的表达式对输入文档进行分类后放入指定数字的桶中跟$bucket不太一样$bucketAuto可以指定分组的数量颗粒度$bucketAuto会根据groupBy的值和颗粒度自动生成桶的边界。 语法 {$bucketAuto: {groupBy: 表达式,buckets: 数字,output: {输出1: { $accumulator 表达式 },...}granularity: 字符串} }groupBy 表达式对文档进行分组的表达式。若指定字段路径需要在字段名前加上美元符号$并用引号引起来如$field_name。 buckets 整数32位的正整数指定桶的数量也就是输入文档分组的数量。 output 文档可选指定了输出文档中除_id字段外要包含的其他字段必须要使用汇总累加器表达式 输出字段1: { accumulator: 表达式1 }, ...如果指定了输出字段则count字段不会自动添加需要的话要手动添加。如果不指定输出字段则默认添加一个count字段。 output: {输出字段1: { accumulator: expres表达式1sion1 },...count: { $sum: 1 } }每个桶文档包含 一个桶边界下限的_id _id.min字段指定了桶边界的下限含。_id.max字段指定了桶边界的上限不含。除系列中的最后一个桶外该界限对所有桶都是排他性的因为在最后一个桶中该界限是包含的。 count字段包含文件桶中的文件数量。如果未指定输出文档则默认包含count字段。 granularity 可选字符串指定了一个字符串用于指定首选数列以确保计算的边界边缘以首选的整数或其10的幂次结束。只有当所有groupBy值都是数值且都不是NaN时才有效。 支持的颗粒度“R5”“R10”“R20”“R40”“R80”“1-2-5”“E6”“E12”“E24”“E48”“E96”“E192”“POWERSOF2”。 说明 如果出现以下情况桶数量可能少于指定数量 输入文件的数量少于指定的文件桶数量。groupBy表达式的唯一值数量少于指定的存储桶数量。粒度的间隔数少于桶数。粒度不够精细无法将文档均匀分布到指定数量的桶中。 groupBy字段的粒度或唯一值的数量决定了文档是否能均匀分布到不同的桶。如果粒度不够$bucketAuto阶段可能无法将结果均匀地分配到各个桶。 粒度 $bucketAuto接受一个可选的粒度参数确保所有数据桶的边界都遵循指定的首选数列。使用首选数列可以更好地控制分组表达式中数值范围内的数据桶边界。当groupBy表达式的范围以指数形式扩展时还可以使用首选数列帮助对数和均匀地设置数据桶边界。 雷纳数列 雷纳数列是通过取10的5次方根、10次方根、20次方根、40次方根或80次方根然后将相当于1.0到 10.0R80 为 10.3之间数值的根的各种幂包含在内而得出的一组数字。 将粒度设置为 R5、R10、R20、R40 或 R80可将数据桶边界限制为系列中的值。当 groupBy 值超出 1.0 至 10.0R80 为 10.3范围时系列值将乘以 10 的幂。 R5 数列以 10 的五次方根 1.58 为基础包括该根的各种幂次四舍五入直至 10。R5 数列的推导过程如下 例如 10 0/5 110 1/5 1.584 ~ 1.610 2/5 2.511 ~ 2.510 3/5 3.981 ~ 4.010 4/5 6.309 ~ 6.310 5/5 10 同样的方法也适用于其他雷纳系列以提供更精细的粒度即 1.0 和 10.0 之间的更多间隔R80 为 10.3。 E 序列 E 数字系列与雷纳数列类似它们以特定的相对误差将 1.0 到 10.0 的区间细分为10的6、12、24、48、96或192的次方根。 将粒度设置为 E6、E12、E24、E48、E96 或 E192可将桶边界限制为序列中的值。当 groupBy 值超出 1.0 到 10.0 的范围时系列值将乘以 10 的幂。 1-2-5 序列 1-2-5 数列类似于三值数列雷纳数列。 将粒度设为 1-2-5可将桶边界限制为 10 的三次根的各种幂四舍五入到一位有效数字。 例如以下数值属于 1-2-5 系列0.1、0.2、0.5、1、2、5、10、20、50、100、200、500、1000 等… 2的次幂序列 将粒度设置为 POWERSOF2限制桶边界为2的次幂 以下数字遵循2的幂序列 2^0 12^1 22^2 42^3 82^4 162^5 32… 一种常见的实现方式是各种计算机组件如内存通常都遵守POWERSOF2的首选数字集1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, … 不同粒度的比较 下面的操作演示了指定不同的粒度值如何影响$bucketAuto确定桶边界的方式。集合的_id从 0 到 99 { _id: 0 } { _id: 1 } ... { _id: 99 }不同的粒度值会被代入到下面的操作中 db.things.aggregate( [{$bucketAuto: {groupBy: $_id,buckets: 5,granularity: granularity}} ] )下表中的结果显示了不同的粒度值如何产生不同的桶边界 粒度结果说明无粒度{ “_id” : { “min” : 0, “max” : 20 }, “count” : 20 }{ “_id” : { “min” : 20, “max” : 40 }, “count” : 20 }{ “_id” : { “min” : 40, “max” : 60 }, “count” : 20 }{ “_id” : { “min” : 60, “max” : 80 }, “count” : 20 }{ “_id” : { “min” : 80, “max” : 99 }, “count” : 20 }R20{ “_id” : { “min” : 0, “max” : 20 }, “count” : 20 }{ “_id” : { “min” : 20, “max” : 40 }, “count” : 20 }{ “_id” : { “min” : 40, “max” : 63 }, “count” : 23 }{ “_id” : { “min” : 63, “max” : 90 }, “count” : 27 }{ “_id” : { “min” : 90, “max” : 100 }, “count” : 10 }E24{ “_id” : { “min” : 0, “max” : 20 }, “count” : 20 }{ “_id” : { “min” : 20, “max” : 43 }, “count” : 23 }{ “_id” : { “min” : 43, “max” : 68 }, “count” : 25 }{ “_id” : { “min” : 68, “max” : 91 }, “count” : 23 }{ “_id” : { “min” : 91, “max” : 100 }, “count” : 9 }1-2-5{ “_id” : { “min” : 0, “max” : 20 }, “count” : 20 }{ “_id” : { “min” : 20, “max” : 50 }, “count” : 30 }{ “_id” : { “min” : 50, “max” : 100 }, “count” : 50 }指定的桶数超过系列中的间隔数。POWERSOF2{ “_id” : { “min” : 0, “max” : 32 }, “count” : 32 }{ “_id” : { “min” : 32, “max” : 64 }, “count” : 32 }{ “_id” : { “min” : 64, “max” : 128 }, “count” : 36 }指定的桶数超过系列中的间隔数。 举例 下面的文档是收藏艺术品的集合 { _id : 1, title : The Pillars of Society, artist : Grosz, year : 1926,price : NumberDecimal(199.99),dimensions : { height : 39, width : 21, units : in } } { _id : 2, title : Melancholy III, artist : Munch, year : 1902,price : NumberDecimal(280.00),dimensions : { height : 49, width : 32, units : in } } { _id : 3, title : Dancer, artist : Miro, year : 1925,price : NumberDecimal(76.04),dimensions : { height : 25, width : 20, units : in } } { _id : 4, title : The Great Wave off Kanagawa, artist : Hokusai,price : NumberDecimal(167.30),dimensions : { height : 24, width : 36, units : in } } { _id : 5, title : The Persistence of Memory, artist : Dali, year : 1931,price : NumberDecimal(483.00),dimensions : { height : 20, width : 24, units : in } } { _id : 6, title : Composition VII, artist : Kandinsky, year : 1913,price : NumberDecimal(385.00),dimensions : { height : 30, width : 46, units : in } } { _id : 7, title : The Scream, artist : Munch,price : NumberDecimal(159.00),dimensions : { height : 24, width : 18, units : in } } { _id : 8, title : Blue Flower, artist : OKeefe, year : 1918,price : NumberDecimal(118.42),dimensions : { height : 24, width : 20, units : in } }单面聚合 在下面的操作中输入文档将根据price字段中的值分成四组 db.artwork.aggregate( [{$bucketAuto: {groupBy: $price,buckets: 4}} ] )该操作会返回以下文件 {_id : {min : NumberDecimal(76.04),max : NumberDecimal(159.00)},count : 2 } {_id : {min : NumberDecimal(159.00),max : NumberDecimal(199.99)},count : 2 } {_id : {min : NumberDecimal(199.99),max : NumberDecimal(385.00)},count : 2 } {_id : {min : NumberDecimal(385.00),max : NumberDecimal(483.00)},count : 2 }多面聚合 …。 可在$facet阶段内使用$bucketAuto对输入文档artwork进行多个聚合管道处理。 下面的聚合管道根据price、year和area将artwork 中的文档分组 db.artwork.aggregate( [{$facet: {price: [{$bucketAuto: {groupBy: $price,buckets: 4}}],year: [{$bucketAuto: {groupBy: $year,buckets: 3,output: {count: { $sum: 1 },years: { $push: $year }}}}],area: [{$bucketAuto: {groupBy: {$multiply: [ $dimensions.height, $dimensions.width ]},buckets: 4,output: {count: { $sum: 1 },titles: { $push: $title }}}}]}} ] )操作返回以下内容 {area : [{_id : { min : 432, max : 500 },count : 3,titles : [The Scream,The Persistence of Memory,Blue Flower]},{_id : { min : 500, max : 864 },count : 2,titles : [Dancer,The Pillars of Society]},{_id : { min : 864, max : 1568 },count : 2,titles : [The Great Wave off Kanagawa,Composition VII]},{_id : { min : 1568, max : 1568 },count : 1,titles : [Melancholy III]}],price : [{_id : { min : NumberDecimal(76.04), max : NumberDecimal(159.00) },count : 2},{_id : { min : NumberDecimal(159.00), max : NumberDecimal(199.99) },count : 2},{_id : { min : NumberDecimal(199.99), max : NumberDecimal(385.00) },count : 2 },{_id : { min : NumberDecimal(385.00), max : NumberDecimal(483.00) },count : 2}],year : [{ _id : { min : null, max : 1913 }, count : 3, years : [ 1902 ] },{ _id : { min : 1913, max : 1926 }, count : 3, years : [ 1913, 1918, 1925 ] },{ _id : { min : 1926, max : 1931 }, count : 2, years : [ 1926, 1931 ] }] }
http://www.w-s-a.com/news/380223/

相关文章:

  • 哪家做网站便宜网络推广培训吧
  • 网站怎么做支付非凡软件站
  • 北京谁会做网站开发熊岳网站怎么做
  • 南阳哪有做网站公司定制网站本地企业
  • 平板上做网站的软件邀约网站怎么做请柬
  • 企业网站成品源码邯郸做网站流程
  • 建设网站需要什么技术两个网站放在同一个服务器 备案
  • 焦作做网站推广天津网络关键词排名
  • siteserver cms网站访问量挂机宝可以做网站吗
  • 普宁网站建设公司网络商城设计
  • wordpress主题 外贸网站wordpress安装后输入帐号登不进去
  • 陕西省西安市建设局网站永登网站设计与建设
  • 广东网站设计招工.免费咨询贷款
  • 做试题网站在线做c 题的网站
  • 青岛发现51例阳性南京专业网站优化公司
  • 南昌建站如何上wordpress
  • 洛阳网站建设优惠公司建筑企业上市公司有哪些
  • 营销型网站建设营销型网站建设手机网站设计需要学什么
  • 在线视频网站 一级做爰片南通网站建设找哪家
  • 网站优化文章东莞专业网站建设价钱
  • 哈尔滨网页设计网站模板泰兴建设局网站
  • 响应式网站设计公司报纸做垂直门户网站
  • 陕西旭泽建设有限公司网站企业网站建设软件需求分析
  • 上海公司网站建设方案中企动力西安分公司
  • dedecms网站后台怎样才能上百度
  • 云互联的网站名字亚马逊雨林生物
  • 电商网站功能企查查企业信息查询网
  • 特色网站建设中国住房和城乡建设局官网
  • 长春市住房城乡建设厅网站做白酒网站
  • 自己的网站怎么做的成品免费ppt网站