What is the error?

David

> Le 12 déc. 2014 à 21:04, Bruno Kamiche <[email protected]> a écrit :
> 
> Hello, I'm testing elastic search and I need to apply different filters, when 
> I include the "range" filter I get an error and the query is not executed, 
> here's the json:
> 
> $json = '{
>         "size" : 10,
>         "from" : 0,
>         "sort" : [
>                 { "_timestamp" : { "order" : "desc" } },
>                 { "_score" : { "order" : "desc" } }
>         ],
>         "query" : {
>                 "filtered" : {
>                         "query" : {
>                                 "query_string" : {
>                                         "fields" : ["mytextfield"],
>                                         "query" : "my query string",
>                                         "default_operator" : "AND"
>                                 }
>                         },
>                         "filter" : {
>                                 "range" : {
>                                         "datefields" : {
>                                                 "gte" : "1325394000",
>                                                 "lte" : "1356930000"
>                                         }
>                                 },
>                                 "bool" :  {
>                                         "must" : [
>                                                 {
>                                                         "term" : { 
> "aq_industryid" : 1 }
>                                                 },
>                                                 {
>                                                         "term" : { 
> "aq_clientid" : 1 }
>                                                 },
>                                                 {
>                                                         "term" : { "ntipo" : 
> [5] }
>                                                 }
>                                         ]
>                                 }
>                         }
>                 }
> 
>         }
> }';
> 
> If I don't include the "range" filter, everything works fine (filtering by 
> the other fields, number of results, order, etc), what am I doing wrong?
> 
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/be4ca3a2-081f-458a-a006-8d8e80ef23e5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/1E9AF9D7-6495-44F9-A77B-D96D6BC74A95%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to