public function ApacheSolrDocument::setField in Apache Solr Search 7
Same name and namespace in other branches
- 8 Apache_Solr_Document.php \ApacheSolrDocument::setField()
- 6.3 Apache_Solr_Document.php \ApacheSolrDocument::setField()
Set a field value. Multi-valued fields should be set as arrays or instead use the addField(...) function which will automatically make sure the field is an array.
Parameters
string $key:
mixed $value:
mixed $boost: Use false for default boost, else cast to float that should be > 0 or will be treated as false
1 call to ApacheSolrDocument::setField()
- ApacheSolrDocument::__set in ./
Apache_Solr_Document.php - Magic set for field values. Multi-valued fields should be set as arrays or instead use the addField(...) function which will automatically make sure the field is an array.
File
- ./
Apache_Solr_Document.php, line 221
Class
- ApacheSolrDocument
- Holds Key / Value pairs that represent a Solr Document along with any associated boost values. Field values can be accessed by direct dereferencing such as:
Code
public function setField($key, $value, $boost = FALSE) {
$this->_fields[$key] = $value;
$this
->setFieldBoost($key, $boost);
}