mirror of https://github.com/apache/lucene.git
SOLR-12036: use DefaultStreamFactory in Solr Ref Guide (Streaming Expressions) example
This commit is contained in:
parent
8d99d32785
commit
0e1426627a
|
@ -99,12 +99,7 @@ The {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/io/package-summary.h
|
||||||
|
|
||||||
[source,java]
|
[source,java]
|
||||||
----
|
----
|
||||||
StreamFactory streamFactory = new StreamFactory().withCollectionZkHost("collection1", zkServer.getZkAddress())
|
StreamFactory streamFactory = new DefaultStreamFactory().withCollectionZkHost("collection1", zkServer.getZkAddress());
|
||||||
.withStreamFunction("search", CloudSolrStream.class)
|
|
||||||
.withStreamFunction("unique", UniqueStream.class)
|
|
||||||
.withStreamFunction("top", RankStream.class)
|
|
||||||
.withStreamFunction("group", ReducerStream.class)
|
|
||||||
.withStreamFunction("parallel", ParallelStream.class);
|
|
||||||
|
|
||||||
ParallelStream pstream = (ParallelStream)streamFactory.constructStream("parallel(collection1, group(search(collection1, q=\"*:*\", fl=\"id,a_s,a_i,a_f\", sort=\"a_s asc,a_f asc\", partitionKeys=\"a_s\"), by=\"a_s asc\"), workers=\"2\", zkHost=\""+zkHost+"\", sort=\"a_s asc\")");
|
ParallelStream pstream = (ParallelStream)streamFactory.constructStream("parallel(collection1, group(search(collection1, q=\"*:*\", fl=\"id,a_s,a_i,a_f\", sort=\"a_s asc,a_f asc\", partitionKeys=\"a_s\"), by=\"a_s asc\"), workers=\"2\", zkHost=\""+zkHost+"\", sort=\"a_s asc\")");
|
||||||
----
|
----
|
||||||
|
|
Loading…
Reference in New Issue