class SolrService extends SolrService_Core (View source)

The API for accessing the primary Solr installation, which includes both SolrService_Core, plus extra methods for interrogating, creating, reloading and getting SolrService_Core instances for Solr cores.

Properties

Methods

protected
Apache_Solr_Response
coreCommand(string $command, string $core, array $params = array())

Handle encoding the GET parameters and making the HTTP call to execute a core command

public
bool
coreIsActive(string $core)

Is the passed core active?

public
Apache_Solr_Response
coreCreate(string $core, string $instancedir, string $config = null, string $schema = null, string $datadir = null)

Create a new core

public
Apache_Solr_Response
coreReload(string $core)

Reload a core

public
serviceForCore(string $core)

Create a new Solr4Service_Core instance for the passed core

Details

protected Apache_Solr_Response coreCommand(string $command, string $core, array $params = array())

Handle encoding the GET parameters and making the HTTP call to execute a core command

Parameters

string $command
string $core
array $params

Return Value

Apache_Solr_Response

bool coreIsActive(string $core)

Is the passed core active?

Parameters

string $core

The name of the core (an encoded class name)

Return Value

bool

True if that core exists & is active

Apache_Solr_Response coreCreate(string $core, string $instancedir, string $config = null, string $schema = null, string $datadir = null)

Create a new core

Parameters

string $core

The name of the core

string $instancedir

The base path of the core on the server

string $config

The filename of solrconfig.xml on the server. Default is $instancedir/solrconfig.xml

string $schema

The filename of schema.xml on the server. Default is $instancedir/schema.xml

string $datadir

The path to store data for this core on the server. Default depends on solrconfig.xml

Return Value

Apache_Solr_Response

Apache_Solr_Response coreReload(string $core)

Reload a core

Parameters

string $core

The name of the core

Return Value

Apache_Solr_Response

Solr4Service_Core serviceForCore(string $core)

Create a new Solr4Service_Core instance for the passed core

Parameters

string $core

The name of the core

Return Value

Solr4Service_Core