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&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>>
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>
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>
.
For more options, visit 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.
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>.
For more options, visit 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>
.
For more options, visit 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
To start a new topic under Elasticsearch Users, email [hidden email]<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>
--
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>
Sent from the Elasticsearch Users mailing list archive<http://elasticsearch-users.115913.n3.nabble.com/>at 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.
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.
--
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.