banana
banana copied to clipboard
Nested (?) Query
Hi all,
Here is the problem i'm facing on : I've got a collection with the following fields : Date_Time, Marker (string), Number (int), i would like to get for a given marker, the value of number at NOW - 1 DAY, NOW - 7 DAYS and for example div(sub(Nbr,NbrD-7),NbrD-7) and put them in a table.
Any clue to do that ? Thanks.
maybe i could precise my problem :
I just would like to get on the same line the value of number for different date. if anybody would know the type of query i need for, i will be truly grateful.
Hi, it seems that the solution is to extend DocTransformer. Check here for more details:
http://lucene.472066.n3.nabble.com/Custom-Response-Handler-td4067558.html
Inside transform you can retrieve values for NOW-1DAY and NOW-7DAY, do the calculations and add fields to response as needed.