MCPcopy Create free account
hub / github.com/apache/solr / doRemoteMode

Method doRemoteMode

solr/core/src/java/org/apache/solr/cli/StreamTool.java:322–329  ·  view source on GitHub ↗

Runs a streaming expression on a Solr collection via the /stream end point and returns the results to the CLI. Requires a collection to be specified to send the expression to. Running remotely allows you to use all the standard Streaming Expression capabilities as the expression is running in a

(String expr, CommandLine cli)

Source from the content-addressed store, hash-verified

320 * Solr /stream.
321 */
322 private PushBackStream doRemoteMode(String expr, CommandLine cli) throws Exception {
323
324 String solrUrl = CLIUtils.normalizeSolrUrl(cli);
325 String collection = cli.getOptionValue(COLLECTION_OPTION);
326
327 return new PushBackStream(
328 new SolrStream(solrUrl + "/solr/" + collection, params("qt", "/stream", "expr", expr)));
329 }
330
331 private static ModifiableSolrParams params(String... params) {
332 if (params.length % 2 != 0) throw new RuntimeException("Params length should be even");

Callers 1

runImplMethod · 0.95

Calls 2

normalizeSolrUrlMethod · 0.95
paramsMethod · 0.95

Tested by

no test coverage detected