【发布时间】:2017-06-20 04:49:19
【问题描述】:
我正在尝试对两个字段时间戳和价格进行方面的透视,这是我的 solr 查询的方式: http://localhost:8888/solr/collection1/select?q=description%3laptop&wt=json&indent=true&facet=true&facet.pivot=timestamp,price&stats=true&stats.field=price&stats.facet=timestamp
这给了我结果:
*"timestamp,price":[{
"field":"timestamp",
"value":"2015-06-02T07:12:29.044Z",
"count":50,
"pivot":[{
"field":"price",
"value":389.0,
"count":9},
{
"field":"price",
"value":388.0,
"count":4},
{
"field":"price",
"value":300.0.....*
我想在执行构面时将时间戳格式从 2015-06-02T07:12:29.044Z 更改为 2015-06-02,以便结果返回为:
*"timestamp,price":[{
"field":"timestamp",
"value":"2015-06-02",
"count":50,
"pivot":[{
"field":"price",
"value":389.0,
"count":9},
{
"field":"price",
"value":388.0,
"count":4},
{
"field":"price",
"value":300.0.....*
所以它是一天而不是一天多次。这可能吗?
【问题讨论】:
标签: solr faceted-search