PHP Interface Smile\ElasticsuiteCore\Api\Index\Mapping\FieldInterface

Author: Aurelien FOUCRET ([email protected])
Show file Open project: smile-sa/elasticsuite Interface Usage Examples

Public Methods

Method Description
getMappingProperty ( string $analyzer = self::ANALYZER_UNTOUCHED ) : string | null Return ES property name eventually using a specified analyzer.
getMappingPropertyConfig ( ) : array Return ES mapping properties associated with the field.
getName ( ) : string Field name.
getNestedFieldName ( ) : string | null Get nested field name (Example: "position" for "category.position").
getNestedPath ( ) : string Returns nested path for the field (Example : "category" for "category.position").
getSearchWeight ( ) : integer Weight of the fields in search.
getType ( ) : string Field type (eg: string, integer, date).
isFilterable ( ) : boolean Is the field filterable in navigation.
isNested ( ) : boolean Return true if the field has a nested path.
isSearchable ( ) : boolean Is the field searchable.
isUsedForSortBy ( ) Is the attribute used in sorting.
isUsedInAutocomplete ( ) : boolean Is the field used for autocomplete.
isUsedInSpellcheck ( ) : boolean Is the field used by the spellchecker.

Method Details

getMappingProperty() public method

Return ES property name eventually using a specified analyzer.
public getMappingProperty ( string $analyzer = self::ANALYZER_UNTOUCHED ) : string | null
$analyzer string Analyzer for multi_type / string fields.
return string | null

getMappingPropertyConfig() public method

Return ES mapping properties associated with the field.
public getMappingPropertyConfig ( ) : array
return array

getName() public method

Field name.
public getName ( ) : string
return string

getNestedFieldName() public method

Returns null for non nested fields.
public getNestedFieldName ( ) : string | null
return string | null

getNestedPath() public method

Returns nested path for the field (Example : "category" for "category.position").
public getNestedPath ( ) : string
return string

getSearchWeight() public method

Weight of the fields in search.
public getSearchWeight ( ) : integer
return integer

getType() public method

See const above for available types.
public getType ( ) : string
return string

isFilterable() public method

Is the field filterable in navigation.
public isFilterable ( ) : boolean
return boolean

isNested() public method

Return true if the field has a nested path.
public isNested ( ) : boolean
return boolean

isSearchable() public method

Is the field searchable.
public isSearchable ( ) : boolean
return boolean

isUsedForSortBy() public method

Is the attribute used in sorting.
public isUsedForSortBy ( )

isUsedInAutocomplete() public method

Is the field used for autocomplete.
public isUsedInAutocomplete ( ) : boolean
return boolean

isUsedInSpellcheck() public method

Is the field used by the spellchecker.
public isUsedInSpellcheck ( ) : boolean
return boolean