【发布时间】:2012-05-15 15:03:22
【问题描述】:
我有一个示例架构,例如:
id:1,date:2012-05-01,parent:p1
id:1,date:2012-05-01,parent:p2
id:1,date:2012-05-01,parent:p3
id:1,date:2012-05-02,parent:p1
id:1,date:2012-05-02,parent:p4
我想对“日期”进行范围查询,并了解每天有多少新的/唯一的父母。换句话说,我想看看随着时间的推移增加了多少新父母。对于给定的数据,输出应如下所示:
2012-04-31:0 (no parents existed an that time)
2012-05-01:3 (because three new parents occured at 2012-05-01: p1,p2,p3)
2012-05-02:4 (which is 3 parents from 2012-05-01 and 1 new unique parent p4 occured at 2012-05-02 which gives a total of 4)
2012-05-03:4 (no new parent was added this day...)
这种查询在 SOLR 中是否可行?
【问题讨论】:
标签: solr