谁能告诉我 Riak 在使用 SOLR api over HTTP 进行搜索时对日期格式的期望是什么?我有一些已编入索引的数据。通配符搜索确认:
{
"responseHeader": {
"status": 0,
"QTime": 13,
"params": {
"q": "*",
"q.op": "or",
"filter": "",
"wt": "json"
}
},
"response": {
"numFound": 2,
"start": 0,
"maxScore": "0.00000e+0",
"docs": [
{
"id": "09d1bf74-9cdc-4001-8797-fc5a4b9170b0",
"index": "TestIndex",
"fields": {
"Timestamp_dt": "2014-06-06T02:10:35.367Z"
},
"props": {}
},
{
"id": "09d1bf74-9cdc-4001-8797-fc5a4b9170b0",
"index": "TestIndex",
"fields": {
"Timestamp_dt": "2014-06-08T02:10:35.367Z"
},
"props": {}
}
]
}
}
我还确认我的架构正在选择 _dt 作为日期时间:
%% Field names ending in "_dt" are indexed as dates
{dynamic_field, [
{name, "*_dt"},
{type, date},
{analyzer_factory, {erlang, text_analyzers, noop_analyzer_factory}}
]},
我尝试了很多变体,包括:
/solr/TestIndex/select?wt=json&q=Timestamp_dt:[20140508000000%20TO%2020140608000000]
/solr/TestIndex/select?wt=json&q=Timestamp_dt:[20140508T000000Z TO 20140607T000000Z]
/solr/TestIndex/select?wt=json&q=Timestamp_dt:%5B2014-05-08T00%3A00%3A00.000Z%20TO%202014-06-07T00%3A00%3A00.000Z%5D
我很难过,而且日期范围的文档有些缺乏。有没有人让这个工作?我是否坚持转换为纪元日期时间?