Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 14
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
ArchiveMappingConfigBuilder
0.00% covered (danger)
0.00%
0 / 14
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 buildConfig
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 1
2
 canOptimizeAnalysisConfig
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace CirrusSearch\Maintenance;
4
5use CirrusSearch\Search\TextIndexField;
6
7class ArchiveMappingConfigBuilder extends MappingConfigBuilder {
8    public const VERSION = '1.0';
9
10    public function buildConfig() {
11        return [
12            'dynamic' => false,
13            'properties' => [
14                'namespace' => $this->searchIndexFieldFactory
15                    ->newLongField( 'namespace' )
16                    ->getMapping( $this->engine ),
17                'title' => $this->searchIndexFieldFactory->newStringField( 'title',
18                    TextIndexField::ENABLE_NORMS )->setMappingFlags( $this->flags )->getMapping( $this->engine ),
19                'wiki' => $this->searchIndexFieldFactory
20                    ->newKeywordField( 'wiki' )
21                    ->getMapping( $this->engine ),
22            ],
23        ];
24    }
25
26    /**
27     * @return bool
28     */
29    public function canOptimizeAnalysisConfig() {
30        return true;
31    }
32}