PHP » GoLang |
login |
register |
about
|
GoLang SolrClient::addDocument
request it (345)
GoLang replacement for PHP's SolrClient::addDocument
[edit | history]
SolrClient::addDocument(PECL solr >= 0.9.2) SolrClient::addDocument — Adds a document to the index Description
public SolrUpdateResponse SolrClient::addDocument
( SolrInputDocument
$doc
[, bool $overwrite = TRUE
[, int $commitWithin = 0
]] )This method adds a document to the index. Parameters
Return ValuesReturns a SolrUpdateResponse object or throws an Exception on failure. Errors/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. Examples
Example #1 SolrClient::addDocument() example
<?php The above example will output something similar to: SolrObject Object ( [responseHeader] => SolrObject Object ( [status] => 0 [QTime] => 1 ) )
Example #2 SolrClient::addDocument() example 2
<?php The above example will output something similar to: SolrObject Object ( [responseHeader] => SolrObject Object ( [status] => 0 [QTime] => 1 ) ) See Also
|
more
Recently updated
more
Most requested
more
Last requests
|