Property | Type | Description | |
---|---|---|---|
$linkedFilters | array | This array contains linked instances of current filter. | |
$logicalOperator | string | But you can override it and merge them using OR (should). | |
$mergeType | string | But you can override it and merge them using OR (should). | |
$mode | Filter mode. | ||
$values | mixed | Filter values. |
Method | Description | |
---|---|---|
__construct ( mixed $values = null ) | Constructor. | |
getLinkedFilters ( ) : |
Returns linked instances of current filter. | |
getLogicalOperator ( ) : string | Returns linked filters logical operator. | |
getMergeType ( ) : string | Returns filter merge type. | |
getMode ( ) : string | Returns filter mode. | |
getValues ( ) : mixed | Retuns filter values as array. | |
hasLinkedFilters ( ) : boolean | Returns true if filter has linked filters. | |
isExclude ( ) : boolean | Returns true if mode is exclude. | |
isInclude ( ) : boolean | Returns true if mode is include. | |
isMergeTypeValid ( ) : boolean | Returns true if merge type is valid. | |
isOff ( ) : boolean | Returns true if mode is off. | |
makeQuery ( ) : array | Returns wrapped elasticsearch filter query. | |
mergeQuery ( array $query ) : array | Merges elastcisearch query with current filter query. | |
query ( mixed $values ) : array | Returns the actual elasticsearch query for one filter. | |
setLogicalOperator ( string $logicalOperator ) | Updates linked filters logical operator. | |
setMergeType ( string $mergeType ) | Sets filter merge type. | |
setOptions ( string $mode = null, string $logicalOperator = null, array $linkedFilters = [] ) | Set filter options. |
Method | Description | |
---|---|---|
mergeBoolQuery ( array $query1, array $query2, string $type ) : array | Merges BOOL elasticsearch queries. |
public __construct ( mixed $values = null ) | ||
$values | mixed | Filter values. |
public getLinkedFilters ( ) : |
||
return |
public getLogicalOperator ( ) : string | ||
return | string | - "AND" || "OR" |
public getMergeType ( ) : string | ||
return | string | - "AND" || "OR" |
public hasLinkedFilters ( ) : boolean | ||
return | boolean |
public isMergeTypeValid ( ) : boolean | ||
return | boolean |
public mergeQuery ( array $query ) : array | ||
$query | array | Elastcisearch query. |
return | array | Merged elasticsearch query. |
public setLogicalOperator ( string $logicalOperator ) | ||
$logicalOperator | string | - "AND" || "OR" |
public setMergeType ( string $mergeType ) | ||
$mergeType | string | - "AND" || "OR" |
protected array $linkedFilters | ||
return | array |
protected string $logicalOperator | ||
return | string |
protected string $mergeType | ||
return | string |