|
SolrClient::addDocumentAdds a document to the index Beschreibung
public SolrUpdateResponse SolrClient::addDocument
( SolrInputDocument
$doc
[, bool $overwrite = true
[, int $commitWithin = 0
]] )This method adds a document to the index. Parameter-Liste
RückgabewerteReturns a SolrUpdateResponse object or throws an Exception on failure. Fehler/ExceptionsThrows SolrClientException if the client had failed, or there was a connection issue. Throws SolrServerException if the Solr Server had failed to process the request. Beispiele
Beispiel #1 SolrClient::addDocument example
<?phpDas oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
SolrObject Object
(
[responseHeader] => SolrObject Object
(
[status] => 0
[QTime] => 1
)
)
Beispiel #2 SolrClient::addDocument example 2
<?phpDas oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
SolrObject Object
(
[responseHeader] => SolrObject Object
(
[status] => 0
[QTime] => 1
)
)
Siehe auch
|