datakaveri/dx-resource-server

[Bug] Issue with default time filter.

Closed this issue · 1 comments

If no temporal parameters are passed to the /entities endpoint, the application tries to enforce a default n days(10 or 30) time filter. Currently, this is not working as expected and returning a 400 response for the correct query.

Issue from log

{
   "error":{
      "root_cause":[
         {
            "type":"parse_exception",
            "reason":"unit [n] not supported for date math [-nowd/d]"
         }
      ],
      "type":"search_phase_execution_exception",
      "reason":"all shards failed",
      "phase":"query",
      "grouped":true,
      "failed_shards":[
         {
            "shard":0,
            "index":"<<index_id>>",
            "node":"",
            "reason":{
               "type":"parse_exception",
               "reason":"unit [n] not supported for date math [-nowd/d]"
            }
         }
      ]
   },
   "status":400
}


The issue is resolved with a change in config, production,now,10 changed to production,10,10.