From my experience this is still limited and lot of things are broken if you still want to do it in a strongly typed manner. The only reliable way is to go right now is via a string-expression building route for the streaming expression.
That being said, if your expressions are simple enough you could build it in a strongly typed manner. @Joel may be able to advise here. > On Jun 27, 2018, at 9:41 AM, Pratik Patel <pra...@semandex.net> wrote: > > Hello Everyone, > > Is there any java library for building Streaming Expressions? Currently, I > am using solr's java client and building Streaming Expressions as follows. > > StreamFactory factory = new StreamFactory().withCollectionZkHost( collName, > zkHost ) > .withFunctionName("gatherNodes", > GatherNodesStream.class) > .withFunctionName("search", CloudSolrStream.class) > .withFunctionName("count", CountMetric.class) > .withFunctionName("having", HavingStream.class) > .withFunctionName("gt", GreaterThanOperation.class) > .withFunctionName("eq", EqualsOperation.class); > HavingStream cs = (HavingStream) factory.constructStream( > <streaming_expression_str> ); > > In this approach, I still have to build streaming_expression_str in code. > Is there any better approach for this or is there any java library to do > this? My search for it didn't yield anything so I was wondering if anyone > here has an idea. > > Thanks, > Pratik