Example usage for org.apache.solr.core CoreContainer CoreContainer

List of usage examples for org.apache.solr.core CoreContainer CoreContainer

Introduction

In this page you can find the example usage for org.apache.solr.core CoreContainer CoreContainer.

Prototype

public CoreContainer(NodeConfig config, Properties properties, CoresLocator locator) 

Source Link

Usage

From source file:org.apache.ofbiz.solr.webapp.OFBizSolrContextFilter.java

License:Apache License

/**
 * Override this to change CoreContainer initialization
 * @return a CoreContainer to hold this server's cores
 *///from  w w w .  j  ava  2  s  .co m
protected CoreContainer createCoreContainer(String solrHome, Properties extraProperties) {
    NodeConfig nodeConfig = null;
    try {
        nodeConfig = loadNodeConfig(solrHome, extraProperties);
    } catch (SolrException e) {
        nodeConfig = loadNodeConfig("specialpurpose/solr/home", extraProperties);
    }
    cores = new CoreContainer(nodeConfig, extraProperties, true);
    cores.load();
    return cores;
}

From source file:org.vootoo.schema.CrossCoreFieldTest.java

License:Apache License

@BeforeClass
public static void beforeClass() {
    coreContainer = new CoreContainer(
            TestHarness.buildTestNodeConfig(new SolrResourceLoader(Paths.get(SolrTestCaseJ4.TEST_HOME()))),
            new Properties(), new NamedCoresLocator(MAIN_CORE, SUB_CORE));
    coreContainer.load();/*from w w w. j  a  v a 2s  .com*/
}