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