Identify change in a field value

Hi,

I am trying to evaluate elasticsearch for an analytics use case. The data
is the logs generated by an ordering application. Below is a very
simplistic representation of the logs generated.

doc1 : Contains sales man details -> {salesman:'S1',agency:'The
Wholesaler',branch:'B1'}
doc2 : Contains the data about the current stock -> {salesman:'S1',
customerName:'Retailer', productname:'shoe', quantity:20,
timestamp:'2014/06/18 10:00:00'}
doc3 : Contains data about new stock (Indicated by later timestamp and an
updated quantity) -> {salesman:'S1', customerName:'Retailer',
productname:'shoe', quantity:40, timestamp:'2014/06/18 11:00:00'}

Doc2 and doc3 have the same structure. We need to identify the change in
quantity and measure the sale of a given product on a given day and
aggregate based on various parameters and analyze.
What would be the best way to approach this?

thanks
Sandesh

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a16fa468-f3e5-486f-9b6c-520924ad59d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.