Class MappingSchema
Object interface for elastic search mapping information.
Namespace: Cake\ElasticSearch\Datasource
Property Summary
Method Summary
-
__construct() public
Constructor
-
field() public
Get the mapping information for a single field.
-
fieldType() public
Get the field type for a field.
-
fields() public
Get the field names in the mapping.
-
name() public
Get the name of the index for this mapping.
Method Detail
__construct() ¶ public
__construct(string $name, array $data)
Constructor
Parameters
-
string
$name The name of the index of the mapping data
-
array
$data The mapping data from elasticsearch
field() ¶ public
field(string $name): array|null
Get the mapping information for a single field.
Can access nested fields through dot paths.
Parameters
-
string
$name The path to the field you want.
Returns
array|null
fieldType() ¶ public
fieldType(string $name): string|null
Get the field type for a field.
Can access nested fields through dot paths.
Parameters
-
string
$name The path to the field you want.
Returns
string|null
fields() ¶ public
fields(): array
Get the field names in the mapping.
Will only return the top level fields. Nested object field names will not be included.
Returns
array