PHP Class Smile\ElasticsuiteCore\Index\Mapping\Field

Author: Aurelien FOUCRET ([email protected])
Inheritance: implements Smile\ElasticsuiteCore\Api\Index\Mapping\FieldInterface
Show file Open project: smile-sa/elasticsuite

Public Methods

Method Description
__construct ( string $name, string $type = 'string', null | string $nestedPath = null, array $fieldConfig = [] ) Constructor.
getMappingProperty ( $analyzer = self::ANALYZER_UNTOUCHED ) {@inheritDoc}
getMappingPropertyConfig ( )
getName ( )
getNestedFieldName ( )
getNestedPath ( )
getSearchWeight ( )
getType ( )
isFilterable ( )
isNested ( )
isSearchable ( )
isUsedForSortBy ( ) {@inheritDoc}
isUsedInAutocomplete ( )
isUsedInSpellcheck ( )

Private Methods

Method Description
checkAnalyzer ( array $property, string $expectedAnalyzer ) : boolean Check if an ES property as the right analyzer.
getFieldAnalyzers ( ) : array Retrieve analyzers used with the current field depending of the field configuration.
getMultiFieldMappingPropertyConfig ( array $analyzers ) : array Build a multi_field configuration from an analyzers list.
getPropertyConfig ( string | null $analyzer = self::ANALYZER_UNTOUCHED ) : array Build the property config from the field type and an optional analyzer (used for string and detected through getAnalyzers).

Method Details

__construct() public method

Constructor.
public __construct ( string $name, string $type = 'string', null | string $nestedPath = null, array $fieldConfig = [] )
$name string Field name.
$type string Field type.
$nestedPath null | string Path for nested fields. null by default and for non-nested fields.
$fieldConfig array Field configuration (see self::$config declaration for available values and default values).

getMappingProperty() public method

{@inheritDoc}
public getMappingProperty ( $analyzer = self::ANALYZER_UNTOUCHED )

getMappingPropertyConfig() public method

getName() public method

public getName ( )

getNestedFieldName() public method

public getNestedFieldName ( )

getNestedPath() public method

public getNestedPath ( )

getSearchWeight() public method

public getSearchWeight ( )

getType() public method

public getType ( )

isFilterable() public method

public isFilterable ( )

isNested() public method

public isNested ( )

isSearchable() public method

public isSearchable ( )

isUsedForSortBy() public method

{@inheritDoc}
public isUsedForSortBy ( )

isUsedInAutocomplete() public method

isUsedInSpellcheck() public method

public isUsedInSpellcheck ( )