wikimedia/mediawiki-extensions-CirrusSearch

View on GitHub
includes/Search/DatetimeIndexField.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace CirrusSearch\Search;

use SearchEngine;

/**
 * Index field representing datetime field.
 * @package CirrusSearch
 */
class DatetimeIndexField extends CirrusIndexField {

    /** @inheritDoc */
    protected $typeName = 'date';

    public function getMapping( SearchEngine $engine ) {
        $config = parent::getMapping( $engine );
        $config['format'] = 'dateOptionalTime';
        return $config;
    }
}