Package org.apache.jackrabbit.oak.plugins.index.solr.configuration

Examples of org.apache.jackrabbit.oak.plugins.index.solr.configuration.SolrServerConfiguration


*/
public class EmbeddedSolrServerProviderTest {

    @Test
    public void testSolrServerInitialization() throws Exception {
        SolrServerConfiguration solrServerConfiguration = new SolrServerConfiguration("target/solr",
                "target/solr/solr.xml", "oak");
        EmbeddedSolrServerProvider embeddedSolrServerProvider = new EmbeddedSolrServerProvider(solrServerConfiguration);
        SolrServer solrServer = embeddedSolrServerProvider.getSolrServer();
        assertNotNull(solrServer);
    }
View Full Code Here


        solrCoreName = String.valueOf(componentContext.getProperties().get(SOLR_CORE_NAME));

        solrHttpPort = Integer.valueOf(String.valueOf(componentContext.getProperties().get(SOLR_HTTP_PORT)));
        solrContext = String.valueOf(componentContext.getProperties().get(SOLR_CONTEXT));

        solrServerConfiguration = new SolrServerConfiguration(solrHome, solrConfigFile, solrCoreName).
                withHttpConfiguration(solrContext, solrHttpPort);
    }
View Full Code Here

            if (cachedSolrServer == null) {
                if (serverType != null && !"none".equals(serverType)) {
                    SolrServerConfigurationProvider solrServerConfigurationProvider = solrServerConfigurationProviders.get(serverType);
                    if (solrServerConfigurationProvider != null) {
                        try {
                            SolrServerConfiguration solrServerConfiguration = solrServerConfigurationProvider.getSolrServerConfiguration();
                            SolrServerProvider solrServerProvider = solrServerConfiguration.getProvider();
                            cachedSolrServer = solrServerProvider.getSolrServer();
                        } catch (Exception e) {
                            log.error("could not get a SolrServerProvider of type {}", serverType, e);
                        }
                    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.index.solr.configuration.SolrServerConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.