The SolrDocument class
(PECL solr >= 0.9.2)
Introduction
Represents a Solr document retrieved from a query response.
Class synopsis
Predefined Constants
SolrDocument::SORT_DEFAULT
-
Default mode for sorting fields within the document.
SolrDocument::SORT_ASC
-
Sorts the fields in ascending order
SolrDocument::SORT_DESC
-
Sorts the fields in descending order
SolrDocument::SORT_FIELD_NAME
-
Sorts the fields by field name.
SolrDocument::SORT_FIELD_VALUE_COUNT
-
Sorts the fields by number of values in each field.
SolrDocument::SORT_FIELD_BOOST_VALUE
-
Sorts the fields by thier boost values.
Table of Contents
- SolrDocument::addField — Adds a field to the document
- SolrDocument::clear — Drops all the fields in the document
- SolrDocument::__clone — Creates a copy of a SolrDocument object
- SolrDocument::__construct — Constructor
- SolrDocument::current — Retrieves the current field
- SolrDocument::deleteField — Removes a field from the document
- SolrDocument::__destruct — Destructor
- SolrDocument::fieldExists — Checks if a field exists in the document
- SolrDocument::__get — Access the field as a property
- SolrDocument::getChildDocuments — Returns an array of child documents (SolrDocument)
- SolrDocument::getChildDocumentsCount — Returns the number of child documents
- SolrDocument::getField — Retrieves a field by name
- SolrDocument::getFieldCount — Returns the number of fields in this document
- SolrDocument::getFieldNames — Returns an array of fields names in the document
- SolrDocument::getInputDocument — Returns a SolrInputDocument equivalent of the object
- SolrDocument::hasChildDocuments — Checks whether the document has any child documents
- SolrDocument::__isset — Checks if a field exists
- SolrDocument::key — Retrieves the current key
- SolrDocument::merge — Merges source to the current SolrDocument
- SolrDocument::next — Moves the internal pointer to the next field
- SolrDocument::offsetExists — Checks if a particular field exists
- SolrDocument::offsetGet — Retrieves a field
- SolrDocument::offsetSet — Adds a field to the document
- SolrDocument::offsetUnset — Removes a field
- SolrDocument::reset — This is an alias to SolrDocument::clear()
- SolrDocument::rewind — Resets the internal pointer to the beginning
- SolrDocument::serialize — Used for custom serialization
- SolrDocument::__set — Adds another field to the document
- SolrDocument::sort — Sorts the fields in the document
- SolrDocument::toArray — Returns an array representation of the document
- SolrDocument::unserialize — Custom serialization of SolrDocument objects
- SolrDocument::__unset — Removes a field from the document
- SolrDocument::valid — Checks if the current position internally is still valid
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-class.solrdocument.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.