| @@ 12-34 (lines=23) @@ | ||
| 9 | use AmaTeam\ElasticSearch\Mapping\Parameter\NullValueParameter; |
|
| 10 | use AmaTeam\ElasticSearch\Mapping\Parameter\StoreParameter; |
|
| 11 | ||
| 12 | class BooleanType extends AbstractType |
|
| 13 | { |
|
| 14 | const ID = 'boolean'; |
|
| 15 | const FRIENDLY_ID = self::ID; |
|
| 16 | ||
| 17 | public function getId(): string |
|
| 18 | { |
|
| 19 | return self::ID; |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * @inheritDoc |
|
| 24 | */ |
|
| 25 | public function getParameters(): array |
|
| 26 | { |
|
| 27 | return [ |
|
| 28 | DocValuesParameter::getInstance(), |
|
| 29 | IndexParameter::getInstance(), |
|
| 30 | NullValueParameter::getInstance(), |
|
| 31 | StoreParameter::getInstance() |
|
| 32 | ]; |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| @@ 12-34 (lines=23) @@ | ||
| 9 | use AmaTeam\ElasticSearch\Mapping\Parameter\NullValueParameter; |
|
| 10 | use AmaTeam\ElasticSearch\Mapping\Parameter\StoreParameter; |
|
| 11 | ||
| 12 | class IpType extends AbstractType |
|
| 13 | { |
|
| 14 | const ID = 'ip'; |
|
| 15 | const FRIENDLY_ID = self::ID; |
|
| 16 | ||
| 17 | public function getId(): string |
|
| 18 | { |
|
| 19 | return self::ID; |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * @inheritDoc |
|
| 24 | */ |
|
| 25 | public function getParameters(): array |
|
| 26 | { |
|
| 27 | return [ |
|
| 28 | DocValuesParameter::getInstance(), |
|
| 29 | IndexParameter::getInstance(), |
|
| 30 | NullValueParameter::getInstance(), |
|
| 31 | StoreParameter::getInstance() |
|
| 32 | ]; |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| @@ 13-37 (lines=25) @@ | ||
| 10 | use AmaTeam\ElasticSearch\Mapping\Parameter\NullValueParameter; |
|
| 11 | use AmaTeam\ElasticSearch\Mapping\Parameter\StoreParameter; |
|
| 12 | ||
| 13 | class TokenCountType extends AbstractType |
|
| 14 | { |
|
| 15 | const ID = 'token_count'; |
|
| 16 | const FRIENDLY_ID = 'tokenCount'; |
|
| 17 | ||
| 18 | public function getId(): string |
|
| 19 | { |
|
| 20 | return self::ID; |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @inheritDoc |
|
| 25 | */ |
|
| 26 | public function getParameters(): array |
|
| 27 | { |
|
| 28 | return [ |
|
| 29 | AnalyzerParameter::getInstance(), |
|
| 30 | // todo: enable_position_increments parameter |
|
| 31 | DocValuesParameter::getInstance(), |
|
| 32 | IndexParameter::getInstance(), |
|
| 33 | NullValueParameter::getInstance(), |
|
| 34 | StoreParameter::getInstance(), |
|
| 35 | ]; |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||