PHP Class Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product\QueryBuilder

Author: Aurelien FOUCRET ([email protected])
Afficher le fichier Open project: smile-sa/elasticsuite Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( AttributeList $attributeList, QueryFactory $queryFactory, Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product\NestedFilterInterface[] $nestedFilters = [] ) Constructor.
getSearchQuery ( Product $productCondition ) : Smile\ElasticsuiteCore\Search\Request\QueryInterface Build the query for a condition.

Private Methods

Méthode Description
applyNegation ( Smile\ElasticsuiteCore\Search\Request\QueryInterface $query ) : Smile\ElasticsuiteCore\Search\Request\QueryInterface Apply a negation to the current query.
getHasImageQuery ( ) : Smile\ElasticsuiteCore\Search\Request\QueryInterface Has image query.
getMatchQueryParams ( Product $productCondition ) : array Retrieve params for a match query from condition.
getRangeQueryParams ( Product $productCondition ) : array Retrieve params for a range query from condition.
getSearchField ( Product $productCondition ) : Smile\ElasticsuiteCore\Model\Search\Request\RelevanceConfig\FieldInterface Retrieve ES mapping field for the current condition.
getSearchFieldName ( Product $productCondition ) : string Retrieve ES mapping field name used for the current condition (including analyzer).
getSpecialAttributesSearchQuery ( Product $productCondition ) : null | Smile\ElasticsuiteCore\Search\Request\QueryInterface Create a query for special attribute.
getTermsQueryParams ( Product $productCondition ) : array Retrieve params for a terms query from condition.
prepareFieldValue ( Product $productCondition ) Update the condition value to ignore empty array items.
prepareQuery ( string $queryType, array $queryParams ) : Smile\ElasticsuiteCore\Search\Request\QueryInterface Instantiate query from type and params.

Method Details

__construct() public méthode

Constructor.
public __construct ( AttributeList $attributeList, QueryFactory $queryFactory, Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product\NestedFilterInterface[] $nestedFilters = [] )
$attributeList AttributeList Search rule product attributes list
$queryFactory Smile\ElasticsuiteCore\Search\Request\Query\QueryFactory Search query factory.
$nestedFilters Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product\NestedFilterInterface[] Filters applied to nested fields during query building.

getSearchQuery() public méthode

Build the query for a condition.
public getSearchQuery ( Product $productCondition ) : Smile\ElasticsuiteCore\Search\Request\QueryInterface
$productCondition Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product Product condition.
Résultat Smile\ElasticsuiteCore\Search\Request\QueryInterface