小编eto*_*ceb的帖子

Mongodb 聚合 - 排序使查询非常慢

Mongodb 3.2,安装在centos 6 上,有足够的内存和磁盘。我有一个包含以下结构的 10K 文档的集合:

{
  "id":5752034,
  "score":7.6,
  "name":"ASUS X551 15.6-inch Laptop", 
  "categoryId":"803",
  "positiveAspects":[{
                       "id":30030525,
                       "name":"price",
                       "score":9.8,
                       "frequency":139,
                       "rank":100098
                     },
                     {
                       "id":30028399,
                       "name":"use",
                       "score":9.9,
                       "frequency":99,
                       "rank":100099
                     }
                     .
                     .
                ]
}
Run Code Online (Sandbox Code Playgroud)

对于每个文档,嵌套数组 positiveAspects 有几百个元素。

该collectoin具有以下索引:

{ "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "proddb.product_trees" }
{ "v" : 1, "key" : { "positiveAspects.id" : 1.0, "positiveAspects.score" : 1.0 }, "name" : "positiveAspects.id_1_positiveAspects.score_1", "ns" : "proddb.product_trees" }
{ "v" : 1, "key" …
Run Code Online (Sandbox Code Playgroud)

mongodb aggregation-framework

5
推荐指数
1
解决办法
5733
查看次数

使用CSS更改输入div焦点上的span div的CSS

我想在输入类型的焦点上更改span div的背景图像.我试图改变适当的父类,但它不适合我.任何帮助,将不胜感激.这是我的代码.

.enq-form-section input[name='treat-cat']:hover .enq-form-section .enq-form .tc-img {
  background: #ccc !important;
}
Run Code Online (Sandbox Code Playgroud)
<div class="form-group">
  <span class="tc-img"></span>
  <input type="text" class="form-control" placeholder="Treatment Category" name="treat-cat">
</div>
Run Code Online (Sandbox Code Playgroud)

html css

2
推荐指数
1
解决办法
1630
查看次数

标签 统计

aggregation-framework ×1

css ×1

html ×1

mongodb ×1