Date range facet_filter

Hi,

I'm having issues with a date_histogram facet using a facet_filter:

"date": {
  "date_histogram": {
    "field": "creationDate",
    "interval": "month"
  },
  "facet_filter": {
    "range": {
      "from": "1325376000000",
      "to": "1325376000000||+1M"
    }
  }
}

I get the following exception:
QueryParsingException[[idx_1.4] [range] filter does not support [from]]; }]

This same filter works great as a top filter element:
"filter": {
"range": {
"creationDate": {
"from": "1325376000000",
"to": "1325376000000||+1M"
}
}
}

Is that a bug or a limitation ?

Cheers,
Jérémie

Not sure but I think that there's somtehing wrong in the way you wrote the range
filter.

IMHO, it should be something like:

 "date": {
   "date_histogram": {
     "field": "creationDate",
     "interval": "month"
   },
   "facet_filter": {
     "range": {
       "creationDate": {
         "from": "1325376000000",
         "to": "1325376000000||+1M"
       }
     }
   }
 }

HTH
David.

Le 5 juin 2012 à 15:26, "Jérémie BORDIER" jeremie.bordier@gmail.com a écrit :

Hi,

I'm having issues with a date_histogram facet using a facet_filter:

"date": {
  "date_histogram": {
    "field": "creationDate",
    "interval": "month"
  },
  "facet_filter": {
    "range": {
      "from": "1325376000000",
      "to": "1325376000000||+1M"
    }
  }
}

I get the following exception:
QueryParsingException[[idx_1.4] [range] filter does not support [from]]; }]

This same filter works great as a top filter element:
"filter": {
"range": {
"creationDate": {
"from": "1325376000000",
"to": "1325376000000||+1M"
}
}
}

Is that a bug or a limitation ?

Cheers,
Jérémie

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet