Hi, Thanks for the answer, but in Trident it doesn't seem possible to emit on a different streams in the same bolt, therefore it wouldn't be possible to combine the output of the 2 streams.
2014-09-15 20:54 GMT+02:00 John Reilly <j...@inconspicuous.org>: > Can you split the initial stream into 2 identical streams (using a bolt) > and then perform a groupBy on each of the streams and then combine the > output of those 2 groupBys? > > On Fri, Sep 12, 2014 at 9:51 AM, Bechennec, Marion <mar...@dictanova.com> > wrote: > >> Hi, >> >> For one of our applications we are trying to perform multiple groupBy >> statements on the same stream, ideally it should look like this : >> >> .stateQuery(...) >> .groupBy(new Fields("field")) >> .chainedAgg() >> .groupBy(new Fields("anotherField")) >> .chainedAgg() >> .aggregate( ...) >> .chainEnd() >> .aggregate(....) >> .aggregate(....) >> .chainEnd(); >> >> Obviously this doesn't work, we've tried several things, and came up with >> something like this : >> .stateQuery(...) >> .groupBy(new Fields("field", "anotherField")) >> .aggregate( /* Do something */) >> .groupBy(new Fields("lemma")) >> .chainedAgg() >> .aggregate(....) >> .aggregate(....) >> .chainEnd(); >> >> However, this doesn't work either, we are not able to reemit the initial >> values on the input stream of the second groupBy statement. >> >> Any thoughts on how can this be accomplished ? >> >> Thank you for your help, >> >> Marion >> >> >