2024 年 PHP Conference Japan

SolrInputDocument 類別

(PECL solr >= 0.9.2)

簡介

此類別表示即將提交到 Solr 索引的 Solr 文件。

類別概要

final class SolrInputDocument {
/* 常數 */
const int SORT_DEFAULT = 1;
const int SORT_ASC = 1;
const int SORT_DESC = 2;
常數 SORT_FIELD_NAME = 1;
常數 SORT_FIELD_VALUE_COUNT = 2;
常數 SORT_FIELD_BOOST_VALUE = 4;
/* 方法 */
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
公開 getFieldBoost(字串 $fieldName): 浮點數
公開 merge(SolrInputDocument $sourceDoc, 布林值 $overwrite = true): 布林值
公開 reset(): 布林值
公開 setBoost(浮點數 $documentBoostValue): 布林值
公開 setFieldBoost(字串 $fieldName, 浮點數 $fieldBoostValue): 布林值
公開 sort(整數 $sortOrderBy, 整數 $sortDirection = SolrInputDocument::SORT_ASC): 布林值
公開 toArray(): 陣列
公開 __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

依提升值排序欄位。

目錄

新增註解

使用者貢獻的註解

此頁面沒有使用者貢獻的註解。
To Top