SolrJ API official documentation best practices, solrj Best Practices
The following content is translated from the Solr Wiki official document. It is copyrighted and can be reproduced at will.
Solrj is a Java client that accesses solr. It provides a java interface for adding, updating, and querying solr indexes. This page introduces the latest version of SolrJ in Solr 1.4.x and its usage in the war package.
For more information about how to use SolrJ in Solr1.3 and Solr1.2, see sol1_1.3 Wiki.
Compatibility between SolrJ and Solr versions
SolrJ is usually backward compatible, so you can use a newer SolrJ version on the earlier Solr version, or use a later SolrJ version on the later Solr version. However, note the following differences:
If you use both 1.x and the newer main version, you must set the response XML Parser because the two versions use incompatible Java bin.
Server. setParser (new XMLResponseParser ());
As long as you do not change the Write Request to a binary stream, it is usually not a big problem to mix 3. x and 4. x or a later version.