Search Cluster API

The search cluster API allows users to connect Fusion with any existing Solr instances that are already present.

Once the Solr cluster is registered with Fusion, requests can be proxied through Fusion to it. The possible requests include search requests, but they can also be content indexing requests, such as the content crawled with a connector.

Once the searchCluster has been configured, the user can create Fusion collections that refer to the Solr collections that have been previously defined.

Search Cluster Definition Properties

Property Description

id
Required

The ID of the search cluster. This is only required when creating a new cluster definition with a POST request.

connectString
Required

The string to use to connect to the existing Solr cluster or standalone instance.

If the existing Solr is running in SolrCloud mode, use the connect string for the ZooKeeper ensemble.

If the existing Solr is running as a standalone instance, use the full URL for the Solr instance.

cloud
Required

Defines if the "cluster" being defined is a SolrCloud cluster (true) or a standalone Solr instance (false).

bufferCommitWithin
Optional

Defines a commitWithin property for the buffer when writing to this cluster. If not defined, the system will default to 10,000 milliseconds.

bufferFlushInterval
Optional

Defines how often to flush the buffer when writing to this cluster. If not defined, the system will default to 1000 milliseconds.

bufferSize
Optional

Defines the size of the buffer. If not defined, the system will default to 100 items in the buffer.

concurrency
Optional

Defines the maximum number of concurrent /parallel requests to Solr servers when Fusion index pipeline Solr Indexer stage has property bufferDocsForSolr set to true.

zkClientTimeout
Optional

The maximum amount of time to wait when communicating with the ZooKeeper ensemble for a SolrCloud instance.

zkConnectTimeout
Optional

The maximum amount of time to wait when trying to connect to the ZooKeeper ensemble for a SolrCloud instance.

Examples

Create a new search cluster that is an existing SolrCloud cluster:

REQUEST

curl -u user:pass -X POST -H 'Content-type: application/json' -d '{"id":"mySolrCluster", "connectString":"10.0.1.6:5001,10.0.1.6:5002,10.0.1.6:5003", "cloud":true}' http://localhost:8764/api/apollo/searchCluster

RESPONSE

{
  "id" : "mySolrCluster",
  "connectString" : "10.0.1.6:5001,10.0.1.6:5002,10.0.1.6:5003",
  "cloud" : true,
}

Create a 'cluster' that is a standalone Solr instance:

REQUEST

curl -u user:pass -X POST -H 'Content-type: application/json' -d '{"id":"myOtherSolrCluster", "connectString":"http://localhost:8983/solr", "cloud":false}' http://localhost:8764/api/apollo/searchCluster

RESPONSE

{
  "id" : "myOtherSolrCluster",
  "connectString" : "http://localhost:8983/solr",
  "cloud" : false,
}

Show the status of each node of 'mySolrCluster':

REQUEST

curl http://localhost:8764/api/apollo/searchCluster/mySolrCluster/nodes

RESPONSE

[ {
  "name" : "10.0.1.11:7574_solr",
  "baseUrl" : "http://10.0.1.11:7574/solr",
  "state" : "active"
}, {
  "name" : "10.0.1.8:7574_solr",
  "baseUrl" : "http://10.0.1.8:7574/solr",
  "state" : "active"
} ]

Show the system information for one named node:

REQUEST

curl http://10.0.1.8:8764/api/apollo/searchCluster/mySolrCluster/systemInfo?nodeName=10.0.1.8:7574_solr

RESPONSE

{
  "10.0.1.8:7574_solr" : {
    "mode" : "solrcloud",
    "lucene" : {
      "solr-spec-version" : "4.8.0",
      "lucene-spec-version" : "4.8.0"
    },
    "jvm" : {
      "version" : "1.8.0_121 25.121-b13",
      "name" : "Oracle Corporation Java HotSpot(TM) 64-Bit Server VM",
      "processors" : 4,
      "memory" : {
        "raw" : {
          "free" : 66736272,
          "total" : 204800000,
          "max" : 204800000,
          "used" : 138063728,
          "used%" : 67.4139296875
        }
      }
    },
    "system" : {
      "name" : "Mac OS X",
      "version" : "10.9.3",
      "arch" : "x86_64",
      "systemLoadAverage" : 2.130859375,
      "committedVirtualMemorySize" : 2963378176,
      "freePhysicalMemorySize" : 9321914368,
      "freeSwapSpaceSize" : 1073741824,
      "processCpuTime" : 313176000000,
      "totalPhysicalMemorySize" : 17179869184,
      "totalSwapSpaceSize" : 1073741824,
      "openFileDescriptorCount" : 208,
      "maxFileDescriptorCount" : 10240,
      "uname" : "Darwin MacMini.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64\n",
      "uptime" : "15:48  up 3 days,  7:08, 7 users, load averages: 2.13 2.01 1.91\n"
    }
  }
}