Свойство | Тип | Описание | |
---|---|---|---|
$callbacks | array | Any user defined callback functions to help manipulate the raw query instance. | |
$callbacks_executed | boolean | Prevents multiple executions. | |
$columns | array | The columns that should be returned. | |
$conditions | array | The search conditions for the query. | |
$index | Mmanos\Search\Index | The search index instance. | |
$limit | integer | The maximum number of records to return. | |
$offset | integer | The number of records to skip. | |
$query | mixed | The raw query used by the current search index driver. |
Метод | Описание | |
---|---|---|
__construct ( Mmanos\Search\Index $index ) : void | Create a new search query builder instance. | |
addCallback ( Closure $callback, array | string $driver = null ) : |
Add a custom callback fn to be called just before the query is executed. | |
count ( ) : integer | Execute the current query and return the total number of results. | |
delete ( ) : void | Execute the current query and perform delete operations on each document found. | |
get ( ) : array | Execute the current query and return the results. | |
limit ( integer $limit, integer $offset ) : |
Set the "limit" and "offset" value of the query. | |
paginate ( integer $num = 15 ) : Illuminate\Pagination\LengthAwarePaginator | Execute the current query and return a paginator for the results. | |
search ( string $field, mixed $value, array $options = [] ) : |
Add a basic search clause to the query. | |
select ( array $columns = ['*'] ) : |
Set the columns to be selected. | |
where ( string $field, mixed $value ) : |
Add a basic where clause to the query. A where clause filter attemtps to match the value you specify as an entire "phrase". It does not guarantee an exact match of the entire field value. | |
whereLocation ( float $lat, float $long, integer $distance_in_meters = 10000 ) : |
Add a geo distance where clause to the query. |
Метод | Описание | |
---|---|---|
executeCallbacks ( ) : void | Execute any callback functions. Only execute once. |
public __construct ( Mmanos\Search\Index $index ) : void | ||
$index | Mmanos\Search\Index | |
Результат | void |
protected executeCallbacks ( ) : void | ||
Результат | void |
public search ( string $field, mixed $value, array $options = [] ) : |
||
$field | string | |
$value | mixed | |
$options | array | - required : requires a match (default) - prohibited : requires a non-match - phrase : match the $value as a phrase - fuzzy : perform a fuzzy search (true, or numeric between 0-1) |
Результат |
protected array $callbacks | ||
Результат | array |
protected bool $callbacks_executed | ||
Результат | boolean |
protected array $columns | ||
Результат | array |
protected array $conditions | ||
Результат | array |
protected Index,Mmanos\Search $index | ||
Результат | Mmanos\Search\Index |
protected int $limit | ||
Результат | integer |
protected mixed $query | ||
Результат | mixed |