| Total Complexity | 1 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Default search index |
||
| 9 | */ |
||
| 10 | class SolrSearchIndex extends CwpSearchIndex |
||
| 11 | { |
||
| 12 | public function init() |
||
| 13 | { |
||
| 14 | $this->addClass(SiteTree::class); |
||
| 15 | |||
| 16 | // By default, we only add text fields that are 'visible' to users (where the content is directly visible on |
||
| 17 | // the website), along with the 'meta' fields that are commonly used to boost / refine search results |
||
| 18 | $this->addFulltextField('Title'); |
||
| 19 | $this->addFulltextField('MenuTitle'); |
||
| 20 | $this->addFulltextField('Content'); |
||
| 21 | $this->addFulltextField('MetaDescription'); |
||
| 22 | $this->addFulltextField('ExtraMeta'); |
||
| 23 | |||
| 24 | // Adds 'ShowInSearch' boolean field to Solr document so we can later ensure that only documents included in |
||
| 31 |