Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function init() |
||
14 | { |
||
15 | $this->addClass(SiteTree::class); |
||
16 | |||
17 | // By default, we only add text fields that are 'visible' to users (where the content is directly visible on |
||
18 | // the website), along with the 'meta' fields that are commonly used to boost / refine search results |
||
19 | $this->addFulltextField('Title'); |
||
20 | $this->addFulltextField('MenuTitle'); |
||
21 | $this->addFulltextField('Content'); |
||
22 | $this->addFulltextField('MetaDescription'); |
||
23 | $this->addFulltextField('ExtraMeta'); |
||
24 | |||
25 | // Adds 'ShowInSearch' boolean field to Solr document so we can later ensure that only documents included in |
||
26 | // search are returned by Solr. |
||
27 | $this->addFilterField('ShowInSearch'); |
||
28 | |||
29 | parent::init(); |
||
30 | } |
||
32 |