# Ranges on facet\_filter

**URL:** https://discuss.elastic.co/t/ranges-on-facet-filter/12788
**Category:** Elasticsearch
**Created:** [July 15, 2013, 11:10am UTC](https://discuss.elastic.co/t/ranges-on-facet-filter/12788 "2013-07-15T11:10:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)
#### Post date: [July 15, 2013, 11:10am UTC](https://discuss.elastic.co/t/ranges-on-facet-filter/12788/1 "2013-07-15T11:10:45Z")

</div>

when i run the following facet i will get the following error, if i remove  
the range it works, es version 0.90.1

{  
"size": 0,  
"facets":  
{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}

}

{

- error: SearchPhaseExecutionException[Failed to execute phase [query],  
total failure; shardFailures {[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][7]:  
SearchParseException[[sla\_stats][7]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][5]:  
SearchParseException[[sla\_stats][5]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][3]:  
SearchParseException[[sla\_stats][3]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][1]:  
SearchParseException[[sla\_stats][1]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][4]:  
SearchParseException[[sla\_stats][4]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][6]:  
SearchParseException[[sla\_stats][6]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][0]:  
SearchParseException[[sla\_stats][0]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }]
- status: 500

}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [July 16, 2013, 4:11pm UTC](https://discuss.elastic.co/t/ranges-on-facet-filter/12788/2 "2013-07-16T16:11:11Z")

</div>

That's strange, the same issue appears for me in 0.90.2. I modified the  
query slightly so that the terms and range filter are inside an array with  
the must clause, but it still does not work. The filter works when the  
terms filter is not present.

Was this JSON created by a client or by hand? There is something missing  
that I can't spot.

--  
Ivan

On Mon, Jul 15, 2013 at 4:10 AM, Alexis Okuwa [wojonstech@gmail.com](mailto:wojonstech@gmail.com) wrote:

> when i run the following facet i will get the following error, if i remove  
> the range it works, es version 0.90.1
> 
> {  
> "size": 0,  
> "facets":  
> {"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}
> 
> }
> 
> {
> 
> - error: SearchPhaseExecutionException[Failed to execute phase  
> [query], total failure; shardFailures  
> {[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][7]:  
> SearchParseException[[sla\_stats][7]: from[-1],size[0]: Parse Failure  
> [Failed to parse source  
> [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][5]:  
> SearchParseException[[sla\_stats][5]: from[-1],size[0]: Parse Failure  
> [Failed to parse source  
> [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][3]:  
> SearchParseException[[sla\_stats][3]: from[-1],size[0]: Parse Failure  
> [Failed to parse source  
> [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][1]:  
> SearchParseException[[sla\_stats][1]: from[-1],size[0]: Parse Failure  
> [Failed to parse source  
> [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][4]:  
> SearchParseException[[sla\_stats][4]: from[-1],size[0]: Parse Failure  
> [Failed to parse source  
> [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][6]:  
> SearchParseException[[sla\_stats][6]: from[-1],size[0]: Parse Failure  
> [Failed to parse source  
> [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][0]:  
> SearchParseException[[sla\_stats][0]: from[-1],size[0]: Parse Failure  
> [Failed to parse source  
> [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> range facet]; }]
> - status: 500
> 
> }
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)
#### Post date: [July 16, 2013, 7:09pm UTC](https://discuss.elastic.co/t/ranges-on-facet-filter/12788/3 "2013-07-16T19:09:11Z")

</div>

This json was created by hand. But if I remove the range call from it the  
error goes away.  
On Jul 16, 2013 9:11 AM, "Ivan Brusic" [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> That's strange, the same issue appears for me in 0.90.2. I modified the  
> query slightly so that the terms and range filter are inside an array with  
> the must clause, but it still does not work. The filter works when the  
> terms filter is not present.
> 
> Was this JSON created by a client or by hand? There is something missing  
> that I can't spot.
> 
> --  
> Ivan
> 
> On Mon, Jul 15, 2013 at 4:10 AM, Alexis Okuwa [wojonstech@gmail.com](mailto:wojonstech@gmail.com)wrote:
> 
> > when i run the following facet i will get the following error, if i  
> > remove the range it works, es version 0.90.1
> > 
> > {  
> > "size": 0,  
> > "facets":  
> > {"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}
> > 
> > }
> > 
> > {
> > 
> > - error: SearchPhaseExecutionException[Failed to execute phase  
> > [query], total failure; shardFailures  
> > {[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][7]:  
> > SearchParseException[[sla\_stats][7]: from[-1],size[0]: Parse Failure  
> > [Failed to parse source  
> > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][5]:  
> > SearchParseException[[sla\_stats][5]: from[-1],size[0]: Parse Failure  
> > [Failed to parse source  
> > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][3]:  
> > SearchParseException[[sla\_stats][3]: from[-1],size[0]: Parse Failure  
> > [Failed to parse source  
> > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][1]:  
> > SearchParseException[[sla\_stats][1]: from[-1],size[0]: Parse Failure  
> > [Failed to parse source  
> > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][4]:  
> > SearchParseException[[sla\_stats][4]: from[-1],size[0]: Parse Failure  
> > [Failed to parse source  
> > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][6]:  
> > SearchParseException[[sla\_stats][6]: from[-1],size[0]: Parse Failure  
> > [Failed to parse source  
> > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][0]:  
> > SearchParseException[[sla\_stats][0]: from[-1],size[0]: Parse Failure  
> > [Failed to parse source  
> > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > range facet]; }]
> > - status: 500
> > 
> > }
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe](https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![zerocoolys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zerocoolys/32/44918_2.png) [@zerocoolys](https://discuss.elastic.co/u/zerocoolys)
#### Post date: [July 17, 2013, 5:38am UTC](https://discuss.elastic.co/t/ranges-on-facet-filter/12788/4 "2013-07-17T05:38:24Z")

</div>

I tested your json query , first time , there was a exception same as yours.

and then I made a changed for the range part  
{  
"range": {  
\* "logTime": [\*

- 

```
       {*

```

- 

```
           "from": 22896658,*

```

- 

```
           "to": 22898098*

```

- 

```
       }*

```

- 

```
   ]*

```

}  
}  
now, it said No mapping for logTime (of course).  
hope this can help you

2013/7/17 Alexis Okuwa [via Elasticsearch Users] \<  
[ml-node+s115913n4038215h36@n3.nabble.com](mailto:ml-node+s115913n4038215h36@n3.nabble.com)\>

> This json was created by hand. But if I remove the range call from it the  
> error goes away.  
> On Jul 16, 2013 9:11 AM, "Ivan Brusic" \<[hidden email][http://user/SendEmail.jtp?type=node&node=4038215&i=0](http://user/SendEmail.jtp?type=node&node=4038215&i=0)\>  
> wrote:
> 
> > That's strange, the same issue appears for me in 0.90.2. I modified the  
> > query slightly so that the terms and range filter are inside an array with  
> > the must clause, but it still does not work. The filter works when the  
> > terms filter is not present.
> > 
> > Was this JSON created by a client or by hand? There is something missing  
> > that I can't spot.
> > 
> > --  
> > Ivan
> > 
> > On Mon, Jul 15, 2013 at 4:10 AM, Alexis Okuwa \<[hidden email][http://user/SendEmail.jtp?type=node&node=4038215&i=1](http://user/SendEmail.jtp?type=node&node=4038215&i=1)
> > 
> > > wrote:
> > 
> > > when i run the following facet i will get the following error, if i  
> > > remove the range it works, es version 0.90.1
> > > 
> > > {  
> > > "size": 0,  
> > > "facets":  
> > > {"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}
> > > 
> > > }
> > > 
> > > {
> > > 
> > > - error: SearchPhaseExecutionException[Failed to execute phase  
> > > [query], total failure; shardFailures  
> > > {[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][7]:  
> > > SearchParseException[[sla\_stats][7]: from[-1],size[0]: Parse Failure  
> > > [Failed to parse source  
> > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][5]:  
> > > SearchParseException[[sla\_stats][5]: from[-1],size[0]: Parse Failure  
> > > [Failed to parse source  
> > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][3]:  
> > > SearchParseException[[sla\_stats][3]: from[-1],size[0]: Parse Failure  
> > > [Failed to parse source  
> > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][1]:  
> > > SearchParseException[[sla\_stats][1]: from[-1],size[0]: Parse Failure  
> > > [Failed to parse source  
> > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][4]:  
> > > SearchParseException[[sla\_stats][4]: from[-1],size[0]: Parse Failure  
> > > [Failed to parse source  
> > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][6]:  
> > > SearchParseException[[sla\_stats][6]: from[-1],size[0]: Parse Failure  
> > > [Failed to parse source  
> > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][0]:  
> > > SearchParseException[[sla\_stats][0]: from[-1],size[0]: Parse Failure  
> > > [Failed to parse source  
> > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > range facet]; }]
> > > - status: 500
> > > 
> > > }
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [hidden email][http://user/SendEmail.jtp?type=node&node=4038215&i=2](http://user/SendEmail.jtp?type=node&node=4038215&i=2)  
> > > .  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe](https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to [hidden  
> > email] [http://user/SendEmail.jtp?type=node&node=4038215&i=3](http://user/SendEmail.jtp?type=node&node=4038215&i=3).
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [hidden email][http://user/SendEmail.jtp?type=node&node=4038215&i=4](http://user/SendEmail.jtp?type=node&node=4038215&i=4)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> * * *
> 
> If you reply to this email, your message will be added to the discussion  
> below:
> 
> [http://elasticsearch-users.115913.n3.nabble.com/ranges-on-facet-filter-tp4038118p4038215.html](http://elasticsearch-users.115913.n3.nabble.com/ranges-on-facet-filter-tp4038118p4038215.html)  
> To start a new topic under Elasticsearch Users, email  
> [ml-node+s115913n115913h74@n3.nabble.com](mailto:ml-node+s115913n115913h74@n3.nabble.com)  
> To unsubscribe from Elasticsearch Users, click here[http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe\_by\_code&node=115913&code=dmJ6ZXJvY29vbEBnbWFpbC5jb218MTE1OTEzfDk1NDU4NzMxMA==](http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=115913&code=dmJ6ZXJvY29vbEBnbWFpbC5jb218MTE1OTEzfDk1NDU4NzMxMA==)  
> .  
> NAML[http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro\_viewer&id=instant\_html!nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify\_subscribers!nabble%3Aemail.naml-instant\_emails!nabble%3Aemail.naml-send\_instant\_email!nabble%3Aemail.naml](http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml)

--  
Jason You @Chengdu China

---

<div class="post-metadata">

### Author: ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)
#### Post date: [July 17, 2013, 7:18am UTC](https://discuss.elastic.co/t/ranges-on-facet-filter/12788/5 "2013-07-17T07:18:28Z")

</div>

made the changes but still same issue

{  
"size": 0,  
"facets": {  
"1d\_time": {  
"statistical": {  
"field": "time\_total",  
"facet\_filter": {  
"bool": {  
"must": {  
"terms": {  
"slaId": [  
"ySgUNIEDTiaqwTZivX0kUA"  
]  
},  
"range": [  
{  
"logTime": {  
"to": 22896658,  
"from": 22898098  
}  
}  
]  
}  
}  
}  
}  
},  
"1d\_up": {  
"terms": {  
"field": "sla\_txt",  
"facet\_filter": {  
"bool": {  
"must": {  
"terms": {  
"slaId": [  
"ySgUNIEDTiaqwTZivX0kUA"  
]  
},  
"range": [  
{  
"logTime": {  
"to": 22896658,  
"from": 22898098  
}  
}  
]  
}  
}  
}  
}  
}  
}  
}

- error: SearchPhaseExecutionException[Failed to execute phase [query],  
total failure; shardFailures {[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][7]:  
SearchParseException[[sla\_stats][7]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][6]:  
SearchParseException[[sla\_stats][6]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][5]:  
SearchParseException[[sla\_stats][5]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][2]:  
SearchParseException[[sla\_stats][2]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][4]:  
SearchParseException[[sla\_stats][4]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][3]:  
SearchParseException[[sla\_stats][3]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][0]:  
SearchParseException[[sla\_stats][0]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }]
- status: 500

On Tue, Jul 16, 2013 at 10:39 PM, eschina [vbzerocool@gmail.com](mailto:vbzerocool@gmail.com) wrote:

> I tested your json query , first time , there was a exception same as  
> yours.
> 
> and then I made a changed for the range part  
> {  
> "range": {  
> \* "logTime": [\*
> 
> - 
> 
> ```
> {*
> 
> ```
> 
> - 
> 
> ```
> "from": 22896658,*
> 
> ```
> 
> - 
> 
> ```
> "to": 22898098*
> 
> ```
> 
> - 
> 
> ```
> }*
> 
> ```
> 
> - 
> 
> ```
> ]*
> 
> ```
> 
> }  
> }  
> now, it said No mapping for logTime (of course).  
> hope this can help you
> 
> 2013/7/17 Alexis Okuwa [via Elasticsearch Users] \<[hidden email][http://user/SendEmail.jtp?type=node&node=4038232&i=0](http://user/SendEmail.jtp?type=node&node=4038232&i=0)
> 
> > 
> 
> > This json was created by hand. But if I remove the range call from it the  
> > error goes away.  
> > On Jul 16, 2013 9:11 AM, "Ivan Brusic" \<[hidden email][http://user/SendEmail.jtp?type=node&node=4038215&i=0](http://user/SendEmail.jtp?type=node&node=4038215&i=0)\>  
> > wrote:
> > 
> > > That's strange, the same issue appears for me in 0.90.2. I modified the  
> > > query slightly so that the terms and range filter are inside an array with  
> > > the must clause, but it still does not work. The filter works when the  
> > > terms filter is not present.
> > > 
> > > Was this JSON created by a client or by hand? There is something missing  
> > > that I can't spot.
> > > 
> > > --  
> > > Ivan
> > > 
> > > On Mon, Jul 15, 2013 at 4:10 AM, Alexis Okuwa \<[hidden email][http://user/SendEmail.jtp?type=node&node=4038215&i=1](http://user/SendEmail.jtp?type=node&node=4038215&i=1)
> > > 
> > > > wrote:
> > > 
> > > > when i run the following facet i will get the following error, if i  
> > > > remove the range it works, es version 0.90.1
> > > > 
> > > > {  
> > > > "size": 0,  
> > > > "facets":  
> > > > {"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}
> > > > 
> > > > }
> > > > 
> > > > {
> > > > 
> > > > - error: SearchPhaseExecutionException[Failed to execute phase  
> > > > [query], total failure; shardFailures  
> > > > {[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][7]:  
> > > > SearchParseException[[sla\_stats][7]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][5]:  
> > > > SearchParseException[[sla\_stats][5]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][3]:  
> > > > SearchParseException[[sla\_stats][3]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][1]:  
> > > > SearchParseException[[sla\_stats][1]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][4]:  
> > > > SearchParseException[[sla\_stats][4]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][6]:  
> > > > SearchParseException[[sla\_stats][6]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][0]:  
> > > > SearchParseException[[sla\_stats][0]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }]
> > > > - status: 500
> > > > 
> > > > }
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [hidden email][http://user/SendEmail.jtp?type=node&node=4038215&i=2](http://user/SendEmail.jtp?type=node&node=4038215&i=2)  
> > > > .
> > > > 
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe](https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe).  
> > > To unsubscribe from this group and all its topics, send an email to [hidden  
> > > email] [http://user/SendEmail.jtp?type=node&node=4038215&i=3](http://user/SendEmail.jtp?type=node&node=4038215&i=3).
> > > 
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [hidden email][http://user/SendEmail.jtp?type=node&node=4038215&i=4](http://user/SendEmail.jtp?type=node&node=4038215&i=4)  
> > .
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > * * *
> > 
> > If you reply to this email, your message will be added to the  
> > discussion below:
> > 
> > [http://elasticsearch-users.115913.n3.nabble.com/ranges-on-facet-filter-tp4038118p4038215.html](http://elasticsearch-users.115913.n3.nabble.com/ranges-on-facet-filter-tp4038118p4038215.html)  
> > To start a new topic under Elasticsearch Users, email [hidden email][http://user/SendEmail.jtp?type=node&node=4038232&i=1](http://user/SendEmail.jtp?type=node&node=4038232&i=1)  
> > To unsubscribe from Elasticsearch Users, click here.  
> > NAML[http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro\_viewer&id=instant\_html!nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify\_subscribers!nabble%3Aemail.naml-instant\_emails!nabble%3Aemail.naml-send\_instant\_email!nabble%3Aemail.naml](http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml)
> 
> --  
> Jason You @Chengdu China  
> elasticsearch from China
> 
> * * *
> 
> View this message in context: Re: ranges on facet\_filter[http://elasticsearch-users.115913.n3.nabble.com/ranges-on-facet-filter-tp4038118p4038232.html](http://elasticsearch-users.115913.n3.nabble.com/ranges-on-facet-filter-tp4038118p4038232.html)  
> Sent from the Elasticsearch Users mailing list archive[http://elasticsearch-users.115913.n3.nabble.com/](http://elasticsearch-users.115913.n3.nabble.com/)at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe](https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Enjoy,  
Alexis Okuwa  
WojonsTech  
424.835.1223

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![zerocoolys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zerocoolys/32/44918_2.png) [@zerocoolys](https://discuss.elastic.co/u/zerocoolys)
#### Post date: [July 17, 2013, 7:55am UTC](https://discuss.elastic.co/t/ranges-on-facet-filter/12788/6 "2013-07-17T07:55:04Z")

</div>

try this , you made a wrong "range" is object ,and "logTime" is a array.

{  
"size": 0,  
"facets": {  
"1d\_time": {  
"statistical": {  
"field": "time\_total",  
"facet\_filter": {  
"bool": {  
"must": {  
"terms": {  
"slaId": [  
"ySgUNIEDTiaqwTZivX0kUA"  
]  
},  
"range": {  
"logTime": [  
{  
"to": 22896658,  
"from": 22898098  
}  
]  
}  
}  
}  
}  
}  
},  
"1d\_up": {  
"terms": {  
"field": "sla\_txt",  
"facet\_filter": {  
"bool": {  
"must": {  
"terms": {  
"slaId": [  
"ySgUNIEDTiaqwTZivX0kUA"  
]  
},  
"range": {  
"logTime": [  
{  
"to": 22896658,  
"from": 22898098  
}  
]  
}  
}  
}  
}  
}  
}  
}  
}

made the changes but still same issue

{  
"size": 0,  
"facets": {  
"1d\_time": {  
"statistical": {  
"field": "time\_total",  
"facet\_filter": {  
"bool": {  
"must": {  
"terms": {  
"slaId": [  
"ySgUNIEDTiaqwTZivX0kUA"  
]  
},  
"range": [  
{  
"logTime": {  
"to": 22896658,  
"from": 22898098  
}  
}  
]  
}  
}  
}  
}  
},  
"1d\_up": {  
"terms": {  
"field": "sla\_txt",  
"facet\_filter": {  
"bool": {  
"must": {  
"terms": {  
"slaId": [  
"ySgUNIEDTiaqwTZivX0kUA"  
]  
},  
"range": [  
{  
"logTime": {  
"to": 22896658,  
"from": 22898098  
}  
}  
]  
}  
}  
}  
}  
}  
}  
}

- error: SearchPhaseExecutionException[Failed to execute phase [query],  
total failure; shardFailures {[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][7]:  
SearchParseException[[sla\_stats][7]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][6]:  
SearchParseException[[sla\_stats][6]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][5]:  
SearchParseException[[sla\_stats][5]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][2]:  
SearchParseException[[sla\_stats][2]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][4]:  
SearchParseException[[sla\_stats][4]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][3]:  
SearchParseException[[sla\_stats][3]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][0]:  
SearchParseException[[sla\_stats][0]: from[-1],size[0]: Parse Failure  
[Failed to parse source  
[{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":[{"logTime":{"to":22896658,"from":22898098}}]}}}}}}}]]];  
nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
range facet]; }]
- status: 500

On Tue, Jul 16, 2013 at 10:39 PM, eschina \<vbzerocool@\> wrote:

> I tested your json query , first time , there was a exception same as  
> yours.
> 
> and then I made a changed for the range part  
> {  
> "range": {  
> \* "logTime": [\*
> 
> - 
> 
> ```
> {*
> 
> ```
> 
> - 
> 
> ```
> "from": 22896658,*
> 
> ```
> 
> - 
> 
> ```
> "to": 22898098*
> 
> ```
> 
> - 
> 
> ```
> }*
> 
> ```
> 
> - 
> 
> ```
> ]*
> 
> ```
> 
> }  
> }  
> now, it said No mapping for logTime (of course).  
> hope this can help you
> 
> 2013/7/17 Alexis Okuwa [via Elasticsearch Users] \<[hidden email]\<[http://user/SendEmail.jtp?type=node&amp;node=4038232&amp;i=0&gt](http://user/SendEmail.jtp?type=node&amp;node=4038232&amp;i=0&gt);
> 
> > 
> 
> > This json was created by hand. But if I remove the range call from it the  
> > error goes away.  
> > On Jul 16, 2013 9:11 AM, "Ivan Brusic" \<[hidden email]\<[http://user/SendEmail.jtp?type=node&amp;node=4038215&amp;i=0&gt;](http://user/SendEmail.jtp?type=node&amp;node=4038215&amp;i=0&gt;)\>  
> > wrote:
> > 
> > > That's strange, the same issue appears for me in 0.90.2. I modified the  
> > > query slightly so that the terms and range filter are inside an array with  
> > > the must clause, but it still does not work. The filter works when the  
> > > terms filter is not present.
> > > 
> > > Was this JSON created by a client or by hand? There is something missing  
> > > that I can't spot.
> > > 
> > > --  
> > > Ivan
> > > 
> > > On Mon, Jul 15, 2013 at 4:10 AM, Alexis Okuwa \<[hidden email]\<[http://user/SendEmail.jtp?type=node&amp;node=4038215&amp;i=1&gt](http://user/SendEmail.jtp?type=node&amp;node=4038215&amp;i=1&gt);
> > > 
> > > > wrote:
> > > 
> > > > when i run the following facet i will get the following error, if i  
> > > > remove the range it works, es version 0.90.1
> > > > 
> > > > {  
> > > > "size": 0,  
> > > > "facets":  
> > > > {"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}
> > > > 
> > > > }
> > > > 
> > > > {
> > > > 
> > > > - error: SearchPhaseExecutionException[Failed to execute phase  
> > > > [query], total failure; shardFailures  
> > > > {[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][7]:  
> > > > SearchParseException[[sla\_stats][7]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][5]:  
> > > > SearchParseException[[sla\_stats][5]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][3]:  
> > > > SearchParseException[[sla\_stats][3]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][1]:  
> > > > SearchParseException[[sla\_stats][1]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][4]:  
> > > > SearchParseException[[sla\_stats][4]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][6]:  
> > > > SearchParseException[[sla\_stats][6]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }{[mXvyEgieR1qVYuz5dbU8mw][sla\_stats][0]:  
> > > > SearchParseException[[sla\_stats][0]: from[-1],size[0]: Parse Failure  
> > > > [Failed to parse source  
> > > > [{"size":0,"facets":{"1d\_time":{"statistical":{"field":"time\_total","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}},"1d\_up":{"terms":{"field":"sla\_txt","facet\_filter":{"bool":{"must":{"terms":{"slaId":["ySgUNIEDTiaqwTZivX0kUA"]},"range":{"logTime":{"gte":22896658,"lte":22898098}}}}}}}}}]]];  
> > > > nested: FacetPhaseExecutionException[Facet [1d\_time]: no ranges defined for  
> > > > range facet]; }]
> > > > - status: 500
> > > > 
> > > > }
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [hidden email]\<[http://user/SendEmail.jtp?type=node&amp;node=4038215&amp;i=2&gt](http://user/SendEmail.jtp?type=node&amp;node=4038215&amp;i=2&gt);  
> > > > .
> > > > 
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe](https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe).  
> > > To unsubscribe from this group and all its topics, send an email to [hidden  
> > > email] \<[http://user/SendEmail.jtp?type=node&amp;node=4038215&amp;i=3&gt;](http://user/SendEmail.jtp?type=node&amp;node=4038215&amp;i=3&gt;).
> > > 
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [hidden email]\<[http://user/SendEmail.jtp?type=node&amp;node=4038215&amp;i=4&gt](http://user/SendEmail.jtp?type=node&amp;node=4038215&amp;i=4&gt);  
> > .
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > * * *
> > 
> > If you reply to this email, your message will be added to the  
> > discussion below:
> > 
> > [http://elasticsearch-users.115913.n3.nabble.com/ranges-on-facet-filter-tp4038118p4038215.html](http://elasticsearch-users.115913.n3.nabble.com/ranges-on-facet-filter-tp4038118p4038215.html)  
> > To start a new topic under Elasticsearch Users, email [hidden email]\<[http://user/SendEmail.jtp?type=node&amp;node=4038232&amp;i=1&gt](http://user/SendEmail.jtp?type=node&amp;node=4038232&amp;i=1&gt);  
> > To unsubscribe from Elasticsearch Users, click here.  
> > NAML\<[http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro\_viewer&amp;id=instant\_html!nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify\_subscribers!nabble%3Aemail.naml-instant\_emails!nabble%3Aemail.naml-send\_instant\_email!nabble%3Aemail.naml&gt](http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml&gt);
> 
> --  
> Jason You @Chengdu China  
> elasticsearch from China
> 
> * * *
> 
> View this message in context: Re: ranges on facet\_filter\<[http://elasticsearch-users.115913.n3.nabble.com/ranges-on-facet-filter-tp4038118p4038232.html&gt](http://elasticsearch-users.115913.n3.nabble.com/ranges-on-facet-filter-tp4038118p4038232.html&gt);  
> Sent from the Elasticsearch Users mailing list archive\<[http://elasticsearch-users.115913.n3.nabble.com/&gt;at](http://elasticsearch-users.115913.n3.nabble.com/&gt;at) [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe](https://groups.google.com/d/topic/elasticsearch/-PHSPw2Xf1s/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> elasticsearch+unsubscribe@.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Enjoy,  
Alexis Okuwa  
WojonsTech  
424.835.1223

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@.  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 2:26am UTC](https://discuss.elastic.co/t/ranges-on-facet-filter/12788/7 "2017-07-06T02:26:00Z")

</div>


