Solr JDBC - DbVisualizer

Solr’s JDBC driver supports DBVisualizer for querying Solr.

For DbVisualizer, you will need to create a new driver for Solr using the DbVisualizer Driver Manager. This will add several SolrJ client .jars to the DbVisualizer classpath. The files required are:

  • all .jars found in $SOLR_HOME/dist/solrj-lib

  • the SolrJ .jar found at $SOLR_HOME/dist/solr-solrj-<version>.jar

Once the driver has been created, you can create a connection to Solr with the connection string format outlined in the generic section and use the SQL Commander to issue queries.

Setup Driver

Open Driver Manager

From the Tools menu, choose Driver Manager to add a driver.

image

Create a New Driver

image

Name the Driver in Driver Manager

Provide a name for the driver, and provide the URL format: jdbc:solr://<zk_connection_string>/?collection=<collection>. Do not fill in values for the variables “zk_connection_string” and “collection”, those will be provided later when the connection to Solr is configured. The Driver Class will also be automatically added when the driver .jars are added.

image

Add Driver Files to Classpath

The driver files to be added are:

  • all .jars in $SOLR_HOME/dist/solrj-lib

  • the SolrJ .jar found in $SOLR_HOME/dist/solr-solrj-<version>.jar

image
image
image
image
image

Review and Close Driver Manager

Once the driver files have been added, you can close the Driver Manager.

Create a Connection

Next, create a connection to Solr using the driver just created.

Use the Connection Wizard

image
image

Name the Connection

image

Select the Solr driver

image

Specify the Solr URL

Provide the Solr URL, using the ZooKeeper host and port and the collection. For example, jdbc:solr://localhost:9983?collection=test

image

Open and Connect to Solr

Once the connection has been created, double-click on it to open the connection details screen and connect to Solr.

image
image

Open SQL Commander to Enter Queries

When the connection is established, you can use the SQL Commander to issue queries and view data.

image
image
Comments on this Page

We welcome feedback on Solr documentation. However, we cannot provide application support via comments. If you need help, please send a message to the Solr User mailing list.