com.gisgraphy.domain.geoloc.service.fulltextsearch
Class SolrClient

java.lang.Object
  extended by com.gisgraphy.domain.geoloc.service.fulltextsearch.SolrClient
All Implemented Interfaces:
IsolrClient

public class SolrClient
extends java.lang.Object
implements IsolrClient

Default implementation for IsolrClient.it represent a client to connect to solR server

Author:
David Masclet

Field Summary
protected static org.slf4j.Logger logger
           
 
Constructor Summary
SolrClient()
          Default constructor needed by spring
SolrClient(java.lang.String solrUrl, org.apache.commons.httpclient.MultiThreadedHttpConnectionManager multiThreadedHttpConnectionManager)
           
 
Method Summary
 void bindToUrl(java.lang.String solrUrl)
           
 org.apache.solr.client.solrj.SolrServer getServer()
          return a handler to the server
 java.lang.String getURL()
           
 boolean isServerAlive()
           
 void setSolRLogLevel(java.util.logging.Level level)
          set the log level of Solr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.slf4j.Logger logger
Constructor Detail

SolrClient

public SolrClient()
Default constructor needed by spring


SolrClient

public SolrClient(@Qualifier(value="fulltextSearchUrl")
                  java.lang.String solrUrl,
                  @Qualifier(value="multiThreadedHttpConnectionManager")
                  org.apache.commons.httpclient.MultiThreadedHttpConnectionManager multiThreadedHttpConnectionManager)
Parameters:
solrUrl - The solr URL of the server to connect
Method Detail

bindToUrl

public void bindToUrl(java.lang.String solrUrl)
Specified by:
bindToUrl in interface IsolrClient
Parameters:
solrUrl - the solr URL

getServer

public org.apache.solr.client.solrj.SolrServer getServer()
Description copied from interface: IsolrClient
return a handler to the server

Specified by:
getServer in interface IsolrClient
Returns:
The server

getURL

public java.lang.String getURL()
Specified by:
getURL in interface IsolrClient
Returns:
The current url of the server

isServerAlive

public boolean isServerAlive()
Specified by:
isServerAlive in interface IsolrClient
Returns:
true if the fulltextsearchengine is alive, otherwise return false;

setSolRLogLevel

public void setSolRLogLevel(java.util.logging.Level level)
Description copied from interface: IsolrClient
set the log level of Solr

Specified by:
setSolRLogLevel in interface IsolrClient
Parameters:
level - the level to set


Copyright © 2010. All Rights Reserved.