\FAA\Handler\SearchFile

Summary

Methods
Properties
Constants
__construct()
GetVersion()
DeleteDocument()
DeleteDocumentList()
AddDocument()
Execute()
PostProcess()
IndexList()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
filterListByFilter()
filterListBySearch()
sortingFunction()
No private properties found
N/A

Methods

__construct()

__construct()

GetVersion()

GetVersion(): string

Get the server version Get the version string of the related and configured solr search server

Returns

string —

The version number

DeleteDocument()

DeleteDocument(integer|string|array  $id,string  $type): \FAA\Obj\Result

Delete a document Delete a document from search index.

Parameters

integer|string|array $id

A object id

string $type

The type of object

Returns

\FAA\Obj\Result —

A system result object

DeleteDocumentList()

DeleteDocumentList(string  $type): \FAA\Obj\Result

Delete a document list Delete a document list from search index.

Parameters

string $type

The type of object

Returns

\FAA\Obj\Result —

A system result object

AddDocument()

AddDocument(integer|string  $id,string  $type,array  $data): \FAA\Obj\Result

Add a document Add a document to search index.

Parameters

integer|string $id

A object id

string $type

The type of object

array $data

The document data with key value pairs

Returns

\FAA\Obj\Result —

A system result object

Execute()

Execute(array  $filters,array  $orders,array  $payload,string  $language,\FAA\Interfaces\SearchPlugin|mixed  $handler): \FAA\Obj\Result

Do search Execute the search operation

Parameters

array $filters

The search query

array $orders

The search order definition

array $payload

The search response definition start integer The start index length integer The count of elements to fetch fields array A list of fields to include echo int The data tables echo counter search string A search term type string A fixed content type

string $language

The request language

\FAA\Interfaces\SearchPlugin|mixed $handler

A search plugin instance

Returns

\FAA\Obj\Result —

A system result object with data table conform response array

PostProcess()

PostProcess(  $list,  $payload): \FAA\Obj\Result

Parameters

$list
$payload

Returns

\FAA\Obj\Result

IndexList()

IndexList(string  $type,array  $list,\FAA\Obj\CronJob  $cron,boolean  $is_full = false): \FAA\Obj\Result

Index list Handler to index a list of files

Parameters

string $type

The system type name

array $list

A list of files

\FAA\Obj\CronJob $cron

A cron job instance

boolean $is_full

When set to true the update will do an diff check of the attribute set

Returns

\FAA\Obj\Result —

A system result object

filterListByFilter()

filterListByFilter(  $list,  $search): array

Parameters

$list
$search

Returns

array

filterListBySearch()

filterListBySearch(array  $list,string  $search): array

filter result list does a quick filtering in the given list, this method operates language independent results will be defined using a strpos() operation

Parameters

array $list

A array of system objects

string $search

The search parameter

Returns

array —

The search response

sortingFunction()

sortingFunction(object  $a,object  $b,array  $sorting,integer  $level): integer

uasort() callback this callback is used to sort a result set by multiple columns

Parameters

object $a

Compare test object 1

object $b

Compare test object 2

array $sorting

The dat table sort list

integer $level

The current processed column from $this->sorting

Returns

integer —

The comparison result