Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
DatetimeIndexField | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
getMapping | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace CirrusSearch\Search; |
4 | |
5 | use SearchEngine; |
6 | |
7 | /** |
8 | * Index field representing datetime field. |
9 | * @package CirrusSearch |
10 | */ |
11 | class DatetimeIndexField extends CirrusIndexField { |
12 | |
13 | /** @inheritDoc */ |
14 | protected $typeName = 'date'; |
15 | |
16 | public function getMapping( SearchEngine $engine ) { |
17 | $config = parent::getMapping( $engine ); |
18 | $config['format'] = 'dateOptionalTime'; |
19 | return $config; |
20 | } |
21 | } |