Re: Geo distance filter exceptions

2014-07-31 Thread Joffrey Hercule
On Wednesday, July 30, 2014 10:08:45 AM UTC-5, Joffrey Hercule wrote: Hi ! Use query. ex : { query : { filtered : { query : { match_all : {} }, filter : { geo_distance : { distance : 50km, city.location

Re: Geo distance filter exceptions

2014-07-30 Thread Joffrey Hercule
Hi ! Use query. ex : { query : { filtered : { query : { match_all : {} }, filter : { geo_distance : { distance : 50km, city.location : { lat : 43.4, lon : 5.4

Why can i do an if in my script ?

2014-07-11 Thread Joffrey Hercule
Hi all, i'm trying to test if a value is in an array but i don't know why my if clause doesn't work... doc['users'] is an array of long values in my example. So If i do : { query : { match_all : {} }, sort : { _script : { script :

Re: Why can i do an if in my script ?

2014-07-11 Thread Joffrey Hercule
, order : desc } } } Le vendredi 11 juillet 2014 17:18:13 UTC+2, Joffrey Hercule a écrit : Hi all, i'm trying to test if a value is in an array but i don't know why my if clause doesn't work... doc['users'] is an array of long values in my example. So If i do : { query