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
 
<SolrDocumentSolrDocument::clear>
^SolrDocumentLast updated: Mon, 26 Oct 2026

SolrDocument::addField

(PECL solr >= 0.9.2)

SolrDocument::addField — Adds a field to the document

Description

public function SolrDocument::addField(string $fieldName, string $fieldValue): bool

This method adds a field to the SolrDocument instance.

Parameters

fieldName

The name of the field

fieldValue

The value of the field.

Return Values

Returns true on success or false on failure.


<SolrDocumentSolrDocument::clear>
^SolrDocumentLast updated: Mon, 26 Oct 2026