PHP 클래스 Nqxcode\LuceneSearch\Model\Config

파일 보기 프로젝트 열기: nqxcode/laravel-lucene-search 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $configuration, Nqxcode\LuceneSearch\Model\Factory $modelFactory ) Create configuration for models.
boost ( Model $model ) : integer Get boost for model.
classUidPair ( Model $model ) : array Get 'key-value' pair for UID of model class.
fields ( Model $model ) : array Get model fields for indexing.
models ( ZendSearch\Lucene\Search\QueryHit[] $hits ) : Nqxcode\LuceneSearch\Support\Collection Get models by query hits.
optionalAttributes ( Model $model ) : array Get optional attributes for indexing for model.
primaryKeyPair ( Model $model ) : array Get 'key-value' pair for private key of model.
repositories ( ) : Model[] | Builder[] Get full list of models instances.

비공개 메소드들

메소드 설명
classUidList ( ZendSearch\Lucene\Search\QueryHit[] $hits ) : array Get classes uid list for hits.
config ( Model $model ) : array Get configuration for model.
groupedSearchableIdsAsKeys ( array $hits ) : array Get searchable id list grouped by classes.
model ( ZendSearch\Lucene\Search\QueryHit $hit ) : Illuminate\Database\Eloquent\Collection | Model | static Get the model by query hit.
newInstanceBy ( $classUid ) : Model Create instance of model by class UID.

메소드 상세

__construct() 공개 메소드

Create configuration for models.
public __construct ( array $configuration, Nqxcode\LuceneSearch\Model\Factory $modelFactory )
$configuration array
$modelFactory Nqxcode\LuceneSearch\Model\Factory

boost() 공개 메소드

Get boost for model.
public boost ( Model $model ) : integer
$model Illuminate\Database\Eloquent\Model
리턴 integer

classUidPair() 공개 메소드

Get 'key-value' pair for UID of model class.
public classUidPair ( Model $model ) : array
$model Illuminate\Database\Eloquent\Model
리턴 array

fields() 공개 메소드

Get model fields for indexing.
public fields ( Model $model ) : array
$model Illuminate\Database\Eloquent\Model
리턴 array

models() 공개 메소드

Get models by query hits.
public models ( ZendSearch\Lucene\Search\QueryHit[] $hits ) : Nqxcode\LuceneSearch\Support\Collection
$hits ZendSearch\Lucene\Search\QueryHit[]
리턴 Nqxcode\LuceneSearch\Support\Collection

optionalAttributes() 공개 메소드

Get optional attributes for indexing for model.
public optionalAttributes ( Model $model ) : array
$model Illuminate\Database\Eloquent\Model
리턴 array

primaryKeyPair() 공개 메소드

Get 'key-value' pair for private key of model.
public primaryKeyPair ( Model $model ) : array
$model Illuminate\Database\Eloquent\Model
리턴 array

repositories() 공개 메소드

Get full list of models instances.
public repositories ( ) : Model[] | Builder[]
리턴 Illuminate\Database\Eloquent\Model[] | Illuminate\Database\Query\Builder[]