SolrInputDocument (class)
The SolrInputDocument class
Introduction
(PECL solr >= 0.9.2)
This class represents a Solr document that is about to be submitted to the Solr index.
Class synopsis
final SolrInputDocument
{
/* Constants */
const integer SORT_DEFAULT = 1 ;
const integer SORT_ASC = 1 ;
const integer SORT_DESC = 2 ;
const integer SORT_FIELD_NAME = 1 ;
const integer SORT_FIELD_VALUE_COUNT = 2 ;
const integer SORT_FIELD_BOOST_VALUE = 4 ;
/* Methods */
public void addChildDocument ( SolrInputDocument $child )
public void addChildDocuments ( array &$docs )
public bool addField ( string $fieldName , string $fieldValue [, float $fieldBoostValue = 0.0 ] )
public bool clear ( void )
public void __clone ( void )
public __construct ( void )
public bool deleteField ( string $fieldName )
public void __destruct ( void )
public bool fieldExists ( string $fieldName )
public float getBoost ( void )
public array getChildDocuments ( void )
public integer getChildDocumentsCount ( void )
public SolrDocumentField getField ( string $fieldName )
public float getFieldBoost ( string $fieldName )
public int getFieldCount ( void )
public array getFieldNames ( void )
public boolean hasChildDocuments ( void )
public bool merge ( SolrInputDocument $sourceDoc [, bool $overwrite = true ] )
public bool reset ( void )
public bool setBoost ( float $documentBoostValue )
public bool setFieldBoost ( string $fieldName , float $fieldBoostValue )
public bool sort ( int $sortOrderBy [, int $sortDirection = SolrInputDocument::SORT_ASC ] )
public array toArray ( void )
}
Predefined Constants
SolrInputDocument Class Constants
SolrInputDocument::SORT_DEFAULT
Sorts the fields in ascending order.
SolrInputDocument::SORT_ASC
Sorts the fields in ascending order.
SolrInputDocument::SORT_DESC
Sorts the fields in descending order.
SolrInputDocument::SORT_FIELD_NAME
Sorts the fields by name
SolrInputDocument::SORT_FIELD_VALUE_COUNT
Sorts the fields by number of values.
SolrInputDocument::SORT_FIELD_BOOST_VALUE
Sorts the fields by boost value.
Table of Contents
- SolrInputDocument::addChildDocument — Adds a child document for block indexing
- SolrInputDocument::addChildDocuments — Adds an array of child documents
- SolrInputDocument::addField — Adds a field to the document
- SolrInputDocument::clear — Resets the input document
- SolrInputDocument::__clone — Creates a copy of a SolrDocument
- SolrInputDocument::__construct — Constructor
- SolrInputDocument::deleteField — Removes a field from the document
- SolrInputDocument::__destruct — Destructor
- SolrInputDocument::fieldExists — Checks if a field exists
- SolrInputDocument::getBoost — Retrieves the current boost value for the document
- SolrInputDocument::getChildDocuments — Returns an array of child documents (SolrInputDocument)
- SolrInputDocument::getChildDocumentsCount — Returns the number of child documents
- SolrInputDocument::getField — Retrieves a field by name
- SolrInputDocument::getFieldBoost — Retrieves the boost value for a particular field
- SolrInputDocument::getFieldCount — Returns the number of fields in the document
- SolrInputDocument::getFieldNames — Returns an array containing all the fields in the document
- SolrInputDocument::hasChildDocuments — Returns true if the document has any child documents
- SolrInputDocument::merge — Merges one input document into another
- SolrInputDocument::reset — This is an alias of SolrInputDocument::clear
- SolrInputDocument::setBoost — Sets the boost value for this document
- SolrInputDocument::setFieldBoost — Sets the index-time boost value for a field
- SolrInputDocument::sort — Sorts the fields within the document
- SolrInputDocument::toArray — Returns an array representation of the input document
← SolrUtils::queryPhrase
SolrInputDocument::addChildDocument →
© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://secure.php.net/manual/en/class.solrinputdocument.php