SolrInputDocument
final class SolrInputDocument (View source)
(PECL solr >= 0.9.2)
Class SolrInputDocument
This class represents a Solr document that is about to be submitted to the Solr index.
Constants
SORT_DEFAULT |
|
SORT_ASC |
|
SORT_DESC |
|
SORT_FIELD_NAME |
|
SORT_FIELD_VALUE_COUNT |
|
SORT_FIELD_BOOST_VALUE |
|
Methods
(PECL solr >= 2.3.0)
Adds a child document for block indexing
(PECL solr >= 2.3.0)
Adds an array of child documents
(PECL solr >= 0.9.2)
Adds a field to the document
(PECL solr >= 0.9.2)
Resets the input document
(PECL solr >= 0.9.2)
Creates a copy of a SolrDocument
(PECL solr >= 0.9.2)
SolrInputDocument constructor.
(PECL solr >= 0.9.2)
Removes a field from the document
(PECL solr >= 0.9.2)
Destructor
(PECL solr >= 0.9.2)
Checks if a field exists
(PECL solr >= 0.9.2)
Retrieves the current boost value for the document
(PECL solr >= 2.3.0)
Returns an array of child documents (SolrInputDocument)
(PECL solr >= 2.3.0)
Returns the number of child documents
(PECL solr >= 0.9.2)
Retrieves a field by name
(PECL solr >= 0.9.2)
Retrieves the boost value for a particular field
(PECL solr >= 0.9.2)
Returns the number of fields in the document
(PECL solr >= 0.9.2)
Returns an array containing all the fields in the document
(PECL solr >= 2.3.0)
Checks whether the document has any child documents
(PECL solr >= 0.9.2)
Merges one input document into another
(PECL solr >= 0.9.2)
This is an alias of SolrInputDocument::clear
(PECL solr >= 0.9.2)
Sets the boost value for this document
(PECL solr >= 0.9.2)
Sets the index-time boost value for a field
https://php.net/manual/en/solrinputdocument.setfieldboost.php
(PECL solr >= 0.9.2)
Sorts the fields within the document
(PECL solr >= 0.9.2)
Returns an array representation of the input document
Details
addChildDocument(SolrInputDocument $child)
(PECL solr >= 2.3.0)
Adds a child document for block indexing
addChildDocuments(array $docs)
(PECL solr >= 2.3.0)
Adds an array of child documents
bool
addField(string $fieldName, string $fieldValue, float $fieldBoostValue = 0.0)
(PECL solr >= 0.9.2)
Adds a field to the document
bool
clear()
(PECL solr >= 0.9.2)
Resets the input document
__clone()
(PECL solr >= 0.9.2)
Creates a copy of a SolrDocument
__construct()
(PECL solr >= 0.9.2)
SolrInputDocument constructor.
bool
deleteField(string $fieldName)
(PECL solr >= 0.9.2)
Removes a field from the document
__destruct()
(PECL solr >= 0.9.2)
Destructor
bool
fieldExists(string $fieldName)
(PECL solr >= 0.9.2)
Checks if a field exists
float|false
getBoost()
(PECL solr >= 0.9.2)
Retrieves the current boost value for the document
SolrInputDocument[]
getChildDocuments()
(PECL solr >= 2.3.0)
Returns an array of child documents (SolrInputDocument)
int
getChildDocumentsCount()
(PECL solr >= 2.3.0)
Returns the number of child documents
SolrDocumentField|false
getField(string $fieldName)
(PECL solr >= 0.9.2)
Retrieves a field by name
float|false
getFieldBoost(string $fieldName)
(PECL solr >= 0.9.2)
Retrieves the boost value for a particular field
int|false
getFieldCount()
(PECL solr >= 0.9.2)
Returns the number of fields in the document
array|false
getFieldNames()
(PECL solr >= 0.9.2)
Returns an array containing all the fields in the document
bool
hasChildDocuments()
(PECL solr >= 2.3.0)
Checks whether the document has any child documents
bool
merge(SolrInputDocument $sourceDoc, bool $overwrite = true)
(PECL solr >= 0.9.2)
Merges one input document into another
bool
reset()
(PECL solr >= 0.9.2)
This is an alias of SolrInputDocument::clear
bool
setBoost(float $documentBoostValue)
(PECL solr >= 0.9.2)
Sets the boost value for this document
setFieldBoost(string $fieldName, float $fieldBoostValue)
(PECL solr >= 0.9.2)
Sets the index-time boost value for a field
https://php.net/manual/en/solrinputdocument.setfieldboost.php
bool
sort(int $sortOrderBy, int $sortDirection = SolrInputDocument::SORT_ASC)
(PECL solr >= 0.9.2)
Sorts the fields within the document
array|false
toArray()
(PECL solr >= 0.9.2)
Returns an array representation of the input document