Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<SolrDocument::keySolrDocument::next>
^SolrDocumentLast updated: Mon, 26 Oct 2026

SolrDocument::merge

(PECL solr >= 0.9.2)

SolrDocument::merge — Merges source to the current SolrDocument

Description

public function SolrDocument::merge(SolrDocument $sourceDoc, bool $overwrite = true): bool

Merges source to the current SolrDocument.

Parameters

sourceDoc

The source document.

overwrite

If this is true then fields with the same name in the destination document will be overwritten.

Return Values

Returns true on success or false on failure.


<SolrDocument::keySolrDocument::next>
^SolrDocumentLast updated: Mon, 26 Oct 2026