Posts

Showing posts with the label solr

SolrJ Java API for Solr

SolrJ Java API for Solr Introduction SolrJ is a Java client to access solr. SolrJ offers a java interface to add, update, and query the solr index. HttpSolrServer I use Spring to load this properties file: solr.host = 127.0.0.1 solr.port = 8983 solr.core = documents # defaults to 0. > 1 not recommended solr.maxretries = 1 # 5 seconds to establish TCP solr.connectiontimeout = 5000 # socket read timeout solr.socketreadtimeout = 50000 # max connections per host solr.maxconnectionsperhost = 250 # max total connections solr.maxtotalconnections = 100 # defaults to false solr.followredirects = false # defaults to false # Server side must support gzip or deflate for this to have any effect. solr.allowcompression = true and to populate this method: public static HttpSolrServer transform ( String url , boolean allowcompression , Integer connectiontimeout , String core , boolean followredirects , Integer maxconnectionsperhost , Integer maxretries , Integer maxtot...