I don't think this is possible. To me the way to solve this kind of issues would be to reindex events as soon as you know their campain_id.
On Thu, Jan 23, 2014 at 2:04 AM, Chen Wang <[email protected]>wrote: > Guys, > I just successfully imported my data to ES, e,g. It has looks like this: > "activity": 'viewed', > "sessionId": "000000143198107b3fe510b041138cd33fdd9252aab9808c", > "campaign_id":"" > , > > "activity": 'campaign_viewed', > "sessionId": "000000143198107b3fe510b041138cd33fdd9252aab9808c", > "campaign_id":"my_campaign" > > As you can see, the two entries has the same session id, and since the > second entry has a campaign_id, i will assume the first activity(viewed) is > also generated from the campaign. > So how can i do count like: > (count the activities that are generated from campaign): > > count(activity) > where sessionId in (select sessionid from index where > campaign_id="m_campaign") ? > > Thanks much! > Chen > > -- > 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/0758af7f-a8ef-451b-a029-e42d1678e73d%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- Adrien Grand -- 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/CAL6Z4j4mEB0rJGPJOF2bcWHn_q-MfO0xzD081_bB2A9%2B52UJww%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
