Apache Solr SolrInputDocument 클래스
(PECL solr >= 0.9.2)
소개
이 클래스는 Solr 색인에 제출될 Solr 문서를 나타냅니다.
클래스 개요
final class SolrInputDocument {
/* Constants */
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;
/* Methods */
public __construct()
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
public __destruct()
}
미리 정의된 상수
SolrInputDocument 클래스 상수
SolrInputDocument::SORT_DEFAULT
- 필드를 오름차순으로 정렬합니다.
SolrInputDocument::SORT_ASC
- 필드를 오름차순으로 정렬합니다.
SolrInputDocument::SORT_DESC
- 필드를 내림차순으로 정렬합니다.
SolrInputDocument::SORT_FIELD_NAME
- 필드를 이름으로 정렬
SolrInputDocument::SORT_FIELD_VALUE_COUNT
- 값의 수를 기준으로 필드를 정렬합니다.
SolrInputDocument::SORT_FIELD_BOOST_VALUE
- 부스트 값으로 필드를 정렬합니다.
목차
- SolrInputDocument::addChildDocument — 블록 인덱싱을 위한 하위 문서 추가
- SolrInputDocument::addChildDocuments — 자식 문서 배열을 추가합니다.
- SolrInputDocument::addField — 문서에 필드 추가
- SolrInputDocument::clear — 입력 문서를 재설정합니다.
- SolrInputDocument::__clone — SolrDocument의 복사본을 만듭니다.
- SolrInputDocument::__construct — Constructor
- SolrInputDocument::deleteField — 문서에서 필드를 제거합니다.
- SolrInputDocument::__destruct — Destructor
- SolrInputDocument::fieldExists — 필드가 있는지 확인
- SolrInputDocument::getBoost — 문서의 현재 부스트 값을 검색합니다.
- SolrInputDocument::getChildDocuments — 자식 문서의 배열을 반환합니다(SolrInputDocument).
- SolrInputDocument::getChildDocumentsCount — 자식 문서의 수를 반환합니다.
- SolrInputDocument::getField — 이름으로 필드 검색
- SolrInputDocument::getFieldBoost — 특정 필드에 대한 부스트 값을 검색합니다.
- SolrInputDocument::getFieldCount — 문서의 필드 수를 반환합니다.
- SolrInputDocument::getFieldNames — 문서의 모든 필드를 포함하는 배열을 반환합니다.
- SolrInputDocument::hasChildDocuments — 문서에 자식 문서가 있으면 true를 반환합니다.
- SolrInputDocument::merge — 하나의 입력 문서를 다른 문서로 병합
- SolrInputDocument::reset — SolrInputDocument::clear의 별칭
- SolrInputDocument::setBoost — 이 문서의 부스트 값을 설정합니다.
- SolrInputDocument::setFieldBoost — 필드에 대한 인덱스 시간 부스트 값을 설정합니다.
- SolrInputDocument::sort — 문서 내의 필드를 정렬합니다.
- SolrInputDocument::toArray — 입력 문서의 배열 표현을 반환합니다.