Solr Class Reference
Query the Solr server. More...
Public Member Functions | |
| __construct ($core="", $host="localhost") | |
| Constructor. | |
| __destruct () | |
| select ($query) | |
| Send a select query to the Solr server. | |
| update ($content) | |
| Send a update query to the Solr server. | |
| commit () | |
| Send a commit query to the Solr server. | |
| deleteInstanceRecord ($uri, $dataset) | |
| Delete a specific instance record in the solr index. | |
| optimize () | |
| Send a optimize query to the Solr server. | |
| flushIndex () | |
| Remove all records in the Solr index. | |
| flushDataset ($dataset) | |
| Remove all records in the Solr index, belonging to a specific dataset. | |
| createSolrAddElementFromWSElement ($wsElement) | |
| Create a Solr element to add to the index from a web service XML element (the XML representation of a RDF resource of the web services). | |
| xmlEncode ($string) | |
| Create/Update a Solr document. | |
Private Member Functions | |
| sendQuery ($query) | |
| Send any kind of query to the Solr server. | |
| sendContent ($content) | |
| Send any kind of query to the Solr server. | |
Private Attributes | |
| $updateUrl | |
| URL where to reach the Solr update endpoint. | |
| $selectUrl | |
| URL where to reach the Solr select (normal query) endpoint. | |
Detailed Description
Query the Solr server.
Definition at line 21 of file Solr.php.
Constructor & Destructor Documentation
| Solr::__construct | ( | $ | core = "", |
|
| $ | host = "localhost" | |||
| ) |
Member Function Documentation
| Solr::commit | ( | ) |
Send a commit query to the Solr server.
- Returns:
- returns the XML resultset with the status of this request
Definition at line 95 of file Solr.php.
References sendContent().

| Solr::createSolrAddElementFromWSElement | ( | $ | wsElement | ) |
Create a Solr element to add to the index from a web service XML element (the XML representation of a RDF resource of the web services).
- Parameters:
-
[in] $wsElement Web service element to convert
- Returns:
- returns an array of Solr document to index
- Todo:
- "object_property" and "object_label" have to be added once everything is indexed.
Definition at line 206 of file Solr.php.
References $type, $types, and xmlEncode().

| Solr::deleteInstanceRecord | ( | $ | uri, | |
| $ | dataset | |||
| ) |
Delete a specific instance record in the solr index.
- Parameters:
-
[in] $uri URI of the instance record to delete [in] $dataset Dataset URI where the instance record is described
Definition at line 109 of file Solr.php.
References $dataset, $uri, and sendContent().

| Solr::flushDataset | ( | $ | dataset | ) |
Remove all records in the Solr index, belonging to a specific dataset.
- Parameters:
-
[in] $dataset Dataset to remove
- Returns:
- returns the XML resultset with the status of this request
Definition at line 153 of file Solr.php.
References sendContent().

| Solr::flushIndex | ( | ) |
Remove all records in the Solr index.
- Returns:
- returns the XML resultset with the status of this request
Definition at line 139 of file Solr.php.
References sendContent().

| Solr::optimize | ( | ) |
Send a optimize query to the Solr server.
- Returns:
- returns the XML resultset with the status of this request
Definition at line 127 of file Solr.php.
References sendContent().

| Solr::select | ( | $ | query | ) |
| Solr::sendContent | ( | $ | content | ) | [private] |
Send any kind of query to the Solr server.
- Parameters:
-
[in] $content Solr query to send to the server
- Returns:
- returns the XML resultset with the status of this request
Definition at line 410 of file Solr.php.
Referenced by commit(), deleteInstanceRecord(), flushDataset(), flushIndex(), optimize(), and update().
| Solr::sendQuery | ( | $ | query | ) | [private] |
| Solr::update | ( | $ | content | ) |
Send a update query to the Solr server.
- Parameters:
-
[in] $content Solr content (add) XML item to add to the server
- Returns:
- returns the XML resultset with the status of this request
Definition at line 83 of file Solr.php.
References sendContent().

| Solr::xmlEncode | ( | $ | string | ) |
Create/Update a Solr document.
- Parameters:
-
[in] $solrDocument A SolrDocument description
- Returns:
- returns FALSE for an internal error
Encode content to be included in XML files
- Parameters:
-
[in] $string The content string to be encoded
- Returns:
- returns the encoded string
Definition at line 395 of file Solr.php.
Referenced by createSolrAddElementFromWSElement().
Member Data Documentation
Solr::$selectUrl [private] |
Solr::$updateUrl [private] |
The documentation for this class was generated from the following file:

