File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ import org.joda.time.DateTime
11
11
/*
12
12
For example, if you have 4 documents of :
13
13
14
- { "doc": "A", "timestamp" : ISODate("2016-02-15T00:43:04.686Z"), "RID " : 1 }
15
- { "doc": "B", "timestamp" : ISODate("2016-02-15T00:43:06.310Z"), "RID " : 2 }
16
- { "doc": "C", "timestamp" : ISODate("2016-01-03T00:43:07.534Z"), "RID " : 1 }
17
- { "doc": "D", "timestamp" : ISODate("2016-01-03T00:43:09.214Z"), "RID " : 2 }
14
+ { "doc": "A", "timestamp" : ISODate("2016-02-15T00:43:04.686Z"), "myid " : 1 }
15
+ { "doc": "B", "timestamp" : ISODate("2016-02-15T00:43:06.310Z"), "myid " : 2 }
16
+ { "doc": "C", "timestamp" : ISODate("2016-01-03T00:43:07.534Z"), "myid " : 1 }
17
+ { "doc": "D", "timestamp" : ISODate("2016-01-03T00:43:09.214Z"), "myid " : 2 }
18
18
19
19
Grouping by `myid` sort latest timestamp, would return only two documents, doc:A and doc:B.
20
20
Removing duplicates of myid’s by returning only documents with the latest timestamp.
You can’t perform that action at this time.
0 commit comments