File
in package
implements
Search
Define file system search
Define the interface for search using the filesystem server
Tags
Interfaces, Classes, Traits and Enums
- Search
Table of Contents
- AddDocument() : Result
- Add a document Add a document to search index.
- DeleteDocument() : Result
- DeleteDocumentList() : Result
- Delete a document list
- Execute() : Result
- GetServerVersion() : string|null
- GetVersion() : string
- IndexList() : Result
- PostProcess() : Result
- filterListByFilter() : array<string|int, mixed>
- filterListBySearch() : array<string|int, mixed>
- filter result list does a quick filtering in the given list, this method operates language independent results will be defined using a strpos() operation
- sortingFunction() : int
- uasort() callback this callback is used to sort a result set by multiple columns
Methods
AddDocument()
Add a document Add a document to search index.
public
AddDocument(int|string $id, string $type, mixed $data) : Result
Parameters
- $id : int|string
-
A object id
- $type : string
-
The type of object
- $data : mixed
-
The document data with key value pairs
Return values
Result —A system result object
DeleteDocument()
public
DeleteDocument(int|string|array<string|int, mixed> $id, string $type) : Result
Parameters
- $id : int|string|array<string|int, mixed>
- $type : string
Tags
Return values
Result —DeleteDocumentList()
Delete a document list
public
DeleteDocumentList(string|null $type) : Result
Delete a document list from search index. When no type is given then delete the hole index
Parameters
- $type : string|null
-
The type of object
Return values
Result —A system result object
Execute()
public
Execute(array<string|int, mixed> $filter, array<string|int, mixed> $order, array<string|int, mixed> $payload, string|null $language, null|object $handler) : Result
Parameters
- $filter : array<string|int, mixed>
- $order : array<string|int, mixed>
- $payload : array<string|int, mixed>
- $language : string|null
- $handler : null|object
Tags
Return values
Result —GetServerVersion()
public
GetServerVersion() : string|null
Tags
Return values
string|null —GetVersion()
public
GetVersion() : string
Tags
Return values
string —IndexList()
public
IndexList(string $type, array<string|int, mixed> $list[, bool $is_full = false ][, int|string|object $correct_count = -1 ]) : Result
Parameters
- $type : string
- $list : array<string|int, mixed>
- $is_full : bool = false
- $correct_count : int|string|object = -1
Tags
Return values
Result —PostProcess()
public
PostProcess(array<string|int, mixed> &$list, array<string|int, mixed> $payload) : Result
Parameters
- $list : array<string|int, mixed>
- $payload : array<string|int, mixed>
Return values
Result —filterListByFilter()
private
filterListByFilter( $list, $search) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed> —filterListBySearch()
filter result list does a quick filtering in the given list, this method operates language independent results will be defined using a strpos() operation
private
filterListBySearch(array<string|int, mixed> $list, string $search) : array<string|int, mixed>
Parameters
- $list : array<string|int, mixed>
-
A array of system objects
- $search : string
-
The search parameter
Return values
array<string|int, mixed> —The search response
sortingFunction()
uasort() callback this callback is used to sort a result set by multiple columns
private
sortingFunction(object $a, object $b, array<string|int, mixed> $sorting, int $level) : int
Parameters
- $a : object
-
Compare test object 1
- $b : object
-
Compare test object 2
- $sorting : array<string|int, mixed>
-
The dat table sort list
- $level : int
-
The current processed column from $this->sorting
Return values
int —The comparison result