# Die SolrInputDocument-Klasse

(PECL solr >= 0.9.2)

## Einführung

Diese Klasse repräsentiert ein Solr-Dokument, das an den Solr-Index übermittelt werden soll.

## Klassenbeschreibung

final class SolrInputDocument {
/* Konstanten */
const int SORT_DEFAULT = 1;
const int SORT_ASC = 1;
const int SORT_DESC = 2;
const int SORT_FIELD_NAME = 1;
const int SORT_FIELD_VALUE_COUNT = 2;
const int SORT_FIELD_BOOST_VALUE = 4;
/* Methoden */
public function __construct()
public function addChildDocument(SolrInputDocument `$child`): void
public function addChildDocuments(array `&$docs`): void
public function addField(string `$fieldName`, string `$fieldValue`, float `$fieldBoostValue` = 0.0): bool
public function clear(): bool
public function __clone(): void
public function deleteField(string `$fieldName`): bool
public function fieldExists(string `$fieldName`): bool
public function getBoost(): float
public function getChildDocuments(): array
public function getChildDocumentsCount(): int
public function getField(string `$fieldName`): SolrDocumentField
public function getFieldBoost(string `$fieldName`): float
public function getFieldCount(): int|false
public function getFieldNames(): array
public function hasChildDocuments(): bool
public function merge(SolrInputDocument `$sourceDoc`, bool `$overwrite` = `true`): bool
public function reset(): bool
public function setBoost(float `$documentBoostValue`): bool
public function setFieldBoost(string `$fieldName`, float `$fieldBoostValue`): bool
public function sort(int `$sortOrderBy`, int `$sortDirection` = SolrInputDocument::SORT_ASC): bool
public function toArray(): array
public function __destruct()
}

## Vordefinierte Konstanten

## SolrInputDocument-Klassenkonstanten

`SolrInputDocument::SORT_DEFAULT`

  Sortiert die Felder in aufsteigender Reihenfolge.

`SolrInputDocument::SORT_ASC`

  Sortiert die Felder in aufsteigender Reihenfolge.

`SolrInputDocument::SORT_DESC`

  Sortiert die Felder in absteigender Reihenfolge.

`SolrInputDocument::SORT_FIELD_NAME`

  Sortiert die Felder nach Namen.

`SolrInputDocument::SORT_FIELD_VALUE_COUNT`

  Sortiert die Felder nach der Anzahl der Werte.

`SolrInputDocument::SORT_FIELD_BOOST_VALUE`

  Sortiert die Felder nach dem Boost-Wert.

## Inhaltsverzeichnis

- 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 — Alias von 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

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open