<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Adds a field to the document</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="solrdocument.offsetget.html">SolrDocument::offsetGet</a></div> <div class="next" style="text-align: right; float: right;"><a href="solrdocument.offsetunset.html">SolrDocument::offsetUnset</a></div> <div class="up"><a href="class.solrdocument.html">SolrDocument</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="solrdocument.offsetset" class="refentry"> <div class="refnamediv"> <h1 class="refname">SolrDocument::offsetSet</h1> <p class="verinfo">(PECL solr >= 0.9.2)</p><p class="refpurpose"><span class="refname">SolrDocument::offsetSet</span> — <span class="dc-title">Adds a field to the document</span></p> </div> <div class="refsect1 description" id="refsect1-solrdocument.offsetset-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>SolrDocument::offsetSet</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$fieldName</code></span> , <span class="methodparam"><span class="type">string</span> <code class="parameter">$fieldValue</code></span> )</div> <p class="para rdfs-comment"> Used when the object is treated as an array to add a field to the document. </p> </div> <div class="refsect1 parameters" id="refsect1-solrdocument.offsetset-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">fieldName</code></em></span> <dd> <p class="para"> The name of the field. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">fieldValue</code></em></span> <dd> <p class="para"> The value for this field. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-solrdocument.offsetset-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="solrdocument.offsetget.html">SolrDocument::offsetGet</a></div> <div class="next" style="text-align: right; float: right;"><a href="solrdocument.offsetunset.html">SolrDocument::offsetUnset</a></div> <div class="up"><a href="class.solrdocument.html">SolrDocument</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>