Apache Solr SolrDocument 클래스

(PECL solr >= 0.9.2)


소개

쿼리 응답에서 검색된 Solr 문서를 나타냅니다.


클래스 개요

                  
final class SolrDocument implements ArrayAccess, Iterator, Serializable {

  /* 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 addField(string $fieldName, string $fieldValue): bool
  public clear(): bool
  public __clone(): void
  public current(): SolrDocumentField
  public deleteField(string $fieldName): bool
  public fieldExists(string $fieldName): bool
  public __get(string $fieldName): SolrDocumentField
  public getChildDocuments(): array
  public getChildDocumentsCount(): int
  public getField(string $fieldName): SolrDocumentField
  public getFieldCount(): int
  public getFieldNames(): array
  public getInputDocument(): SolrInputDocument
  public hasChildDocuments(): bool
  public __isset(string $fieldName): bool
  public key(): string
  public merge(SolrDocument $sourceDoc, bool $overwrite = true): bool
  public next(): void
  public offsetExists(string $fieldName): bool
  public offsetGet(string $fieldName): SolrDocumentField
  public offsetSet(string $fieldName, string $fieldValue): void
  public offsetUnset(string $fieldName): void
  public reset(): bool
  public rewind(): void
  public serialize(): string
  public __set(string $fieldName, string $fieldValue): bool
  public sort(int $sortOrderBy, int $sortDirection = SolrDocument::SORT_ASC): bool
  public toArray(): array
  public unserialize(string $serialized): void
  public __unset(string $fieldName): bool
  public valid(): bool
  public __destruct()
}
                  
                

미리 정의된 상수

SolrDocument::SORT_DEFAULT
문서 내에서 필드를 정렬하기 위한 기본 모드입니다.
SolrDocument::SORT_ASC
필드를 오름차순으로 정렬
SolrDocument::SORT_DESC
필드를 내림차순으로 정렬
SolrDocument::SORT_FIELD_NAME
필드 이름을 기준으로 필드를 정렬합니다.
SolrDocument::SORT_FIELD_VALUE_COUNT
각 필드의 값 수를 기준으로 필드를 정렬합니다.
SolrDocument::SORT_FIELD_BOOST_VALUE
해당 부스트 값을 기준으로 필드를 정렬합니다.

목차