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.

Manage Search Cluster Definitions: List, Create, Update, Delete

The path for this request is:

/api/apollo/searchCluster/<id>

where <id> is the name of a specific search cluster.

  • GET - returns the definition of a specific cluster, or all defined clusters, if the cluster name is omitted.

  • POST - creates a new search cluster definition.

  • PUT - modifies an existing serach cluster definition.

  • DELETE - removes the search cluster definition.

Get System Information and Node Status for a Specific Search Cluster

The path for this request is one of:

/api/apollo/searchCluster/<id>/systemInfo

/api/apollo/searchCluster/<id>/nodes

where <id> is the name of a specific search cluster.

A GET request provides information about a specific search cluster. The systemInfo request returns details such as the JVM version, the OS, free space available, etc. A nodes request returns the status of each node of the cluster.

A systemInfo request takes the following parameters:

Parameter Description

nodeName

When defined with the name of a specific node, such as "nodeName=10.0.1.11:7574_solr", system information will be returned for the named node only.

all

When defined as "all=true", system information for every node of the cluster will be returned.

For the 'nodes' endpoint, the output will include the node name, the baseURL for the node and it’s current state as known by ZooKeeper.

For the 'systemInfo' endpoint, the output will include detailed system information such as the Lucene and Solr versions, the JVM version and memory settings, the OS and version, the available server memory and disk space, the system load and other similar settings.

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"
    }
  }
}