回答編集履歴
1
追記
test
CHANGED
@@ -6,4 +6,26 @@
|
|
6
6
|
|
7
7
|
```
|
8
8
|
|
9
|
+
---
|
10
|
+
|
11
|
+
追記
|
12
|
+
|
13
|
+
こちらはどうでしょうか?
|
14
|
+
|
15
|
+
```mongoQuery
|
16
|
+
|
17
|
+
db.jfile.aggregate([
|
18
|
+
|
19
|
+
{$unwind:"$entities"},
|
20
|
+
|
21
|
+
{$match : {"entities.name" : "インド"}},
|
22
|
+
|
23
|
+
{$group : {_id:"$_id","entities": {$push : "$entities"}}},
|
24
|
+
|
9
|
-
|
25
|
+
{$project : {"entities.salience" : 1}}
|
26
|
+
|
27
|
+
])
|
28
|
+
|
29
|
+
```
|
30
|
+
|
31
|
+
[参考サイト](https://fits.hatenablog.com/entry/2018/12/10/004155)
|