(PECL solr >= 0.9.2)
This class represents a Solr document that is about to be submitted to the Solr index.
public addChildDocument(SolrInputDocument $child): void
public addChildDocuments(array &$docs): void
public addField(string $fieldName, string $fieldValue, float $fieldBoostValue = 0.0): bool
public clear(): bool
public __clone(): void
public deleteField(string $fieldName): bool
public fieldExists(string $fieldName): bool
public getBoost(): float
public getChildDocuments(): array
public getChildDocumentsCount(): int
public getField(string $fieldName): SolrDocumentField
public getFieldBoost(string $fieldName): float
public getFieldCount(): int|false
public getFieldNames(): array
public hasChildDocuments(): bool
public merge(SolrInputDocument $sourceDoc, bool $overwrite = true): bool
public reset(): bool
public setBoost(float $documentBoostValue): bool
public setFieldBoost(string $fieldName, float $fieldBoostValue): bool
public sort(int $sortOrderBy, int $sortDirection = SolrInputDocument::SORT_ASC): bool
public toArray(): array
SolrInputDocument::SORT_DEFAULTSorts the fields in ascending order.
SolrInputDocument::SORT_ASCSorts the fields in ascending order.
SolrInputDocument::SORT_DESCSorts the fields in descending order.
SolrInputDocument::SORT_FIELD_NAMESorts the fields by name
SolrInputDocument::SORT_FIELD_VALUE_COUNTSorts the fields by number of values.
SolrInputDocument::SORT_FIELD_BOOST_VALUESorts the fields by boost value.
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.solrinputdocument.php