The SolrInputDocument class

Introduction

This class represents a Solr document that is about to be submitted to the Solr index.

Class synopsis

SolrInputDocument
final class SolrInputDocument {
/* Constants */
const int SolrInputDocument::SORT_DEFAULT = 1;
const int SolrInputDocument::SORT_ASC = 1;
const int SolrInputDocument::SORT_DESC = 2;
const int SolrInputDocument::SORT_FIELD_NAME = 1;
const int SolrInputDocument::SORT_FIELD_VALUE_COUNT = 2;
const int SolrInputDocument::SORT_FIELD_BOOST_VALUE = 4;
/* Methods */
public __construct()
public void addChildDocument(SolrInputDocument $child)
public void addChildDocuments(array &$docs)
public bool addField(string $fieldName, string $fieldValue, float $fieldBoostValue = 0.0)
public bool clear()
public void __clone()
public bool deleteField(string $fieldName)
public bool fieldExists(string $fieldName)
public float getBoost()
public array getChildDocuments()
public int getChildDocumentsCount()
public SolrDocumentField getField(string $fieldName)
public float getFieldBoost(string $fieldName)
public intfalse getFieldCount()
public array getFieldNames()
public bool hasChildDocuments()
public bool merge(SolrInputDocument $sourceDoc, bool $overwrite = true)
public bool reset()
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()
public __destruct()
}

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