Registry / networking / solr-solrj

solr-solrj

JSON →
library10.0.0javamavenunverified

Apache Solr client library (Solrj) for interacting with Solr search server instances via Java.

<dependency> <groupId>org.apache.solr</groupId> <artifactId>solr-solrj</artifactId> <version>10.0.0</version> </dependency>
INSTALL
IMPORT
SIG · SOLR-SOLRJ
S
solr-solrj
networkingjavav10.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SolrClient
org.apache.solr.client.solrj.SolrClient

Index a document to a Solr server using Solrj.

import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.common.SolrInputDocument; public class Example { public static void main(String[] args) throws Exception { SolrClient client = new HttpSolrClient.Builder("http://localhost:8983/solr").build(); SolrInputDocument doc = new SolrInputDocument(); doc.addField("id", "1"); doc.addField("title", "Example"); client.add(doc); client.commit(); System.out.println("Document indexed"); } }
Debug
Known issues
breakingSolr 10.0.0 uses Java 17+; older Java versions are not supported.
fix
Ensure your runtime uses Java 17 or later.
affects: >=10.0.0
Upgrade
Version history
10.0.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
solr-solrj — mvn dependency:get solr-solrj · libregistry