/** * Generate mappings for Solr based upon currently configured search indexing */ public static function generate_solr_configuration($po_opts = null) { require_once __CA_LIB_DIR__ . "/core/Search/Solr/SolrConfiguration.php"; SolrConfiguration::updateSolrConfiguration(true); // @TODO what if something goes wrong!? CLIUtils::addMessage(_t('Solr schema was created successfully!'), array('color' => 'bold_green')); CLIUtils::addMessage(_t("Note that all data has been wiped from the index so you must issue a full reindex now, either using caUtils rebuild-search-index or the web-based tool under Manage > Administration > Maintenance."), array('color' => 'red')); }
private function _refreshSolrConfiguration() { SolrConfiguration::updateSolrConfiguration(); /* reload all cores */ $vo_http_client = new Zend_Http_Client(); $vo_http_client->setUri($this->ops_search_solr_url . "/" . "/admin/cores"); $vo_search_indexing_config = Configuration::load($this->opo_search_config->get('search_indexing_config')); $va_tables = $vo_search_indexing_config->getAssocKeys(); /* reload all tables */ foreach ($va_tables as $vs_table) { $vo_http_client->setParameterGet(array('action' => 'RELOAD', 'core' => $vs_table)); $vo_http_client->request(); } }