com.gisgraphy.fulltext

## Class SolrClient

- java.lang.Object
- - com.gisgraphy.fulltext.SolrClient

- All Implemented Interfaces:
    IsolrClient

      public class SolrClient
      extends Object
      implements IsolrClient

  Default implementation for IsolrClient.it represent a client to connect to solR server
  Author:
    David Masclet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.slf4j.Logger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SolrClient()` Default constructor needed by spring
    `SolrClient(String solrUrl, org.apache.commons.httpclient.MultiThreadedHttpConnectionManager multiThreadedHttpConnectionManager)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `bindToUrl(String solrUrl)`
    `org.apache.solr.client.solrj.SolrServer` | `getServer()` return a handler to the server
    `String` | `getURL()`
    `boolean` | `isServerAlive()`
    `void` | `setSolRLogLevel(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

          @Autowired
          public SolrClient(@Qualifier(value="fulltextSearchUrl")
                              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(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 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(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 © 2015. All rights reserved.