@Experimental(value=SOURCE_SINK) public class SolrIO extends java.lang.Object
SolrIO.read() returns a bounded PCollection<SolrDocument> representing Solr documents.
 
To configure the read(), you have to provide a connection configuration
 containing the Zookeeper address of the Solr cluster, and the collection name. The following
 example illustrates options for configuring the source:
 
 SolrIO.ConnectionConfiguration conn = SolrIO.ConnectionConfiguration.create("127.0.0.1:9983");
 // Optionally: .withBasicCredentials(username, password)
 PCollection<SolrDocument> docs = p.apply(
     SolrIO.read().from("my-collection").withConnectionConfiguration(conn));
 You can specify a query on the read() using withQuery().
 
To write documents to Solr, use SolrIO.write(), which writes Solr
 documents from a PCollection<SolrInputDocument> (which can be bounded
 or unbounded).
 
To configure SolrIO.write(), similar to the read, you have to provide a
 connection configuration, and a collection name. For instance:
 
 PCollection<SolrInputDocument> inputDocs = ...;
 inputDocs.apply(SolrIO.write().to("my-collection").withConnectionConfiguration(conn));
 When writing it is possible to customize the retry behavior if an error is encountered. By default this is disabled and only one attempt will be made.
| Modifier and Type | Class and Description | 
|---|---|
| static class  | SolrIO.ConnectionConfigurationA POJO describing a connection configuration to Solr. | 
| static class  | SolrIO.ReadA  PTransformreading data from Solr. | 
| static class  | SolrIO.ReadAll | 
| static class  | SolrIO.ReplicaInfoA POJO describing a replica of Solr. | 
| static class  | SolrIO.RetryConfigurationA POJO encapsulating a configuration for retry behavior when issuing requests to Solr. | 
| static class  | SolrIO.WriteA  PTransformwriting data to Solr. | 
| Modifier and Type | Method and Description | 
|---|---|
| static SolrIO.Read | read() | 
| static SolrIO.ReadAll | readAll() | 
| static SolrIO.Write | write() | 
public static SolrIO.Read read()
public static SolrIO.ReadAll readAll()
public static SolrIO.Write write()