forked from nyeholt/silverstripe-solr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_config.php
24 lines (17 loc) · 840 Bytes
/
_config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
// Add to mysite/_config.php
/*
DataObject::add_extension('SiteTree', 'SolrIndexable');
Object::add_extension('Page_Controller', 'SolrSearchExtension');
*/
// To enable faceting, you need to specify which fields should be available
// SolrSearchPage::$facets = array ('AlcKeywords_ms', 'AlcPerson_ms', 'AlcCompany_ms', 'AlcOrganization_ms');
// You will also need to specify a solr configuration if your solr application is on a different host:port than
// the default
// SolrSearchService::$solr_details = array();
if (($solr_module_dir = basename(dirname(__FILE__))) != 'solr') {
exit("The solr module must be installed in /solr, not in $solr_module_dir");
}
if (!class_exists('MultiValueField')) {
exit("The solr module requires the multivaluefield module from https://github.com/nyeholt/silverstripe-multivaluefield");
}