Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 10
ArchiveMappingConfigBuilder
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 10
 buildConfig
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 9
 canOptimizeAnalysisConfig
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
<?php
namespace CirrusSearch\Maintenance;
use CirrusSearch\Search\TextIndexField;
class ArchiveMappingConfigBuilder extends MappingConfigBuilder {
    public const VERSION = '1.0';
    public function buildConfig() {
        return [
            'dynamic' => false,
            'properties' => [
                'namespace' => $this->searchIndexFieldFactory
                    ->newLongField( 'namespace' )
                    ->getMapping( $this->engine ),
                'title' => $this->searchIndexFieldFactory->newStringField( 'title',
                    TextIndexField::ENABLE_NORMS )->setMappingFlags( $this->flags )->getMapping( $this->engine ),
                'wiki' => $this->searchIndexFieldFactory
                    ->newKeywordField( 'wiki' )
                    ->getMapping( $this->engine ),
            ],
        ];
    }
    /**
     * @return bool
     */
    public function canOptimizeAnalysisConfig() {
        return true;
    }
}