11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The SQL interface supports queries sent from SQL clients and database visualization tools such as DbVisualizer<br />

and <strong>Apache</strong> Zeppelin.<br />

Generic<br />

For most Java based clients, the following jars will need to be placed on the client classpath:<br />

all .jars found in $SOLR_HOME/dist/solrj-libs<br />

the <strong>Solr</strong>J .jar found at $SOLR_HOME/dist/solr-solrj-.jar<br />

If you are using Maven, the org.apache.solr.solr-solrj artifact contains the required jars.<br />

Once the jars are available on the classpath, the <strong>Solr</strong> JDBC driver name is org.apache.solr.client.solr<br />

j.io.sql.DriverImpl and a connection can be made with the following connection string format:<br />

jdbc:solr://SOLR_ZK_CONNECTION_STRING?collection=COLLECTION_NAME<br />

There are other parameters that can be optionally added to the connection string like aggregationMode and n<br />

umWorkers. An example of a Java connection is available in the section JDBC Driver.<br />

DbVisualizer<br />

For DbVisualizer, you will need to create a new driver for <strong>Solr</strong> using the DbVisualizer Driver Manager. This will<br />

add several <strong>Solr</strong>J client .jars to the DbVisualizer classpath. The files required are:<br />

all .jars found in $SOLR_HOME/dist/solrj-libs<br />

the <strong>Solr</strong>J .jar found at $SOLR_HOME/dist/solr-solrj-.jar<br />

Once the driver has been created, you can create a connection to <strong>Solr</strong> with the connection string format outlined<br />

in the generic section and use the SQL Commander to issue queries. Detailed step-by-step screenshots are<br />

available in the PDF documentation attached to SOLR-8521.<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

434

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!