The SolrInputDocument class

(PECL solr >= 0.9.2)

Introduction

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

Class synopsis

finalclassSolrInputDocument {
constintSORT_DEFAULT = 1;
constintSORT_ASC = 1;
constintSORT_DESC = 2;
public__construct()
publicaddField(string$fieldName, string$fieldValue, float$fieldBoostValue = 0.0): bool
publicclear(): bool
public__clone(): void
publicdeleteField(string$fieldName): bool
publicfieldExists(string$fieldName): bool
publicgetBoost(): float
publicgetFieldBoost(string$fieldName): float
publicmerge(SolrInputDocument$sourceDoc, bool$overwrite = true): bool
publicreset(): bool
publicsetBoost(float$documentBoostValue): bool
publicsetFieldBoost(string$fieldName, float$fieldBoostValue): bool
publicsort(int$sortOrderBy, int$sortDirection = SolrInputDocument::SORT_ASC): bool
publictoArray(): array
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

To Top