This fails with a parse error. I can only seem to run this query without a
format and I get a unix timestamp. What can I do to get the timestamp
formatted properly.
can you try to use date formats instead of the named identificators like
date_time and see if it works? Also, can you check the exception of the
elasticsearch logs?
This fails with a parse error. I can only seem to run this query without a
format and I get a unix timestamp. What can I do to get the timestamp
formatted properly.
On Wednesday, April 9, 2014 7:49:13 PM UTC+12, Alexander Reelsen wrote:
Hey,
can you try to use date formats instead of the named identificators like
date_time and see if it works? Also, can you check the exception of the
elasticsearch logs?
I tried the "yyyy-MM-dd .." it gives an exception and doesn't seem to like
the key "format"
ailed to execute [org.elasticsearch.action.search.SearchRequest@2c5fbec]
lastShard [true]
org.elasticsearch.search.SearchParseException: [blah][0]: from[-1],size[0]:
Parse Failure [Failed to parse source
[{"size":0,"aggregations":{"min_date":{"min":{"field":"time_stamp","format":"HH:mm"}},"max_date":{"max":{"field":"time_stamp"}}}}]]
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:634)
at
org.elasticsearch.search.SearchService.createContext(SearchService.java:507)
at
org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:480)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:252)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:202)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:216)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:203)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:186)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.elasticsearch.search.SearchParseException: [blah][0]:
from[-1],size[0]: Parse Failure [Unknown key for a VALUE_STRING in
[min_date]: [format].]
at
org.elasticsearch.search.aggregations.metrics.ValuesSourceMetricsAggregatorParser.parse(ValuesSourceMetricsAggregatorParser.java:68)
at
org.elasticsearch.search.aggregations.AggregatorParsers.parseAggregators(AggregatorParsers.java:114)
at
org.elasticsearch.search.aggregations.AggregatorParsers.parseAggregators(AggregatorParsers.java:77)
at
org.elasticsearch.search.aggregations.AggregationParseElement.parse(AggregationParseElement.java:60)
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:622)
... 11 more
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.