弹性范围搜索失败

时间:2017-01-23 16:04:59

标签: php elasticsearch

我的范围过滤器在我的Windows弹性1.4实例上保持失败。它没有错误只返回没有记录。

  PUT reseller_api_logging
  {
    "mappings": {
      "record": { 
      "properties": { 
        "PastelAccountNumber":    { "type": "string"  }, 
        "CreatedAt":     { "type": "date" ,"format":"yyyy-MM-dd HH:mm:ss" }, 
        "HTTPmethod":     { "type": "string"  }, 
        "ContentTypeRequest":     { "type": "string"  }, 
        "Endpoint":     { "type": "string"  }, 
        "RequestParams":     { "type": "string" , "index": "not_analyzed" }, 
        "RawResponse":     { "type": "string" , "index": "not_analyzed" }, 
        "Response":     { "type": "string" , "index": "not_analyzed" }
      }
    }
  }
}

这是范围查询:

GET reseller_api_logging/_search
{
    "query": {
        "range" : {
            "CreatedAt" : {
                  "gte" : "2017-01-01 01:01:49",
                "lte" : "2017-01-30 09:01:49"
            }
        }
    }
}

这是一篇文章中的一篇文章返回匹配所有搜索:

{
   "took": 2,
   "timed_out": false,
   "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
   },
   "hits": {
      "total": 50,
      "max_score": 1,
      "hits": [
         {
            "_index": "reseller_api_logging",
            "_type": "logging",
            "_id": "2142183",
            "_score": 1,
            "_source": {
               "PastelAccountNumber": "103206",
               "CreatedAt": "2017-01-23 09:01:49",
               "HTTPmethod": "GET",
               "Endpoint": "getServiceSessionDetailsById",
               "RequestParams": "

0 个答案:

没有答案