Parsing exception

(Rajesh M) #1

I am getting the error "Discover: [parsing_exception] [range] query does not support [ranges], with { line=1 & col=115 }"
"aggs": {
"range": {
"date_range": {
"field": "paiddate",
"format": "MM-yyy",
"ranges": [
"to": "now"
"from": "now/M"
it says it does not support ranges, then "field", then format"
Where am I going wrong. I am trying to create a search

(Felix Stürmer) #2

Hi @moorthyrajesh,

what version of the Elastic Stack are you using and what are the steps that lead to that error?

(Rajesh M) #3

the recent 5.4 on ubuntu 14.04
The steps are simple, I create the search and I get the error.

Sorry for being sarcastic!! :slight_smile:


(Felix Stürmer) #4

And what search are you performing in Discover that produces the query you included?

(Rajesh M) #5

I want to create a metric that will show the sum of a particular column for this month and this day

I would like to save the search and use it for the metric. BTW, the query was written by me and edited


(Felix Stürmer) #6

The Discover app only works with plain queries, but does not support aggregations. You can create various visualizations based on aggregations using the Visualize or Timelion apps, depending on your requirements.

You can base Visualize charts on saved searches that filter the set of documents used to compute the aggregations on.

Maybe you can describe the kind of visualization you want and the shape of the data?

(Rajesh M) #7

I have been hunting all over for writing a search query till now (last two days).

All I want to do is to filter the data for one month and one day separately, Can you help??

(Felix Stürmer) #8

I'm sorry to say that I still don't understand your requirements. Could you maybe describe what kind of graph or table you want to produce with which axes or columns and what the shape of your documents is?

(Rajesh M) #9

I want to show a number on the dash board . This is for the current month total (using metrics).

Similarly i would like to show a sum of a partuicular column for the day. I understand using the now/M to now and now/d to now will get this result.

I am not able to this using metrics. I was directed to create a search in discover which can be used in the metric. Trust I am clear in explaining.

(Felix Stürmer) #10

As I said, Discover can only narrow down the set of documents that form the basis for the aggregation. To narrow your documents to a specific time interval you can use the ranges syntax:

@timestamp:[now/M TO now/M]

You can either save those as saved searches and base your visualizations on them or just use them in the query bar of the visualizations themselves.

(Rajesh M) #11

Thanks for your help. I have been wondering how to do this till now.

(system) #12

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.