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

Examples of org.apache.jackrabbit.oak.plugins.index.solr.configuration.EmbeddedSolrServerConfiguration$HttpConfiguration


    protected void preCreateRepository(Jcr jcr) {
        String path = getClass().getResource("/").getFile() + "/queryjcrtest";
        File f = new File(path);
        final SolrServer solrServer;
        try {
            solrServer = new EmbeddedSolrServerProvider(new EmbeddedSolrServerConfiguration(f.getPath(), "", "oak")).getSolrServer();
        } catch (Exception e) {
            throw new RuntimeException();
        }
        SolrServerProvider solrServerProvider = new SolrServerProvider() {
            @Override
View Full Code Here


    protected void preCreateRepository(Jcr jcr) {
        String path = getClass().getResource("/").getFile() + "/queryjcrtest";
        File f = new File(path);
        final SolrServer solrServer;
        try {
            solrServer = new EmbeddedSolrServerProvider(new EmbeddedSolrServerConfiguration(f.getPath(), "", "oak")).getSolrServer();
        } catch (Exception e) {
            throw new RuntimeException();
        }
        SolrServerProvider solrServerProvider = new SolrServerProvider() {
            @Override
View Full Code Here

            assert file.createNewFile();
        }
        solrConfigFile = String.valueOf(componentContext.getProperties().get(SOLR_CONFIG_FILE));
        solrCoreName = String.valueOf(componentContext.getProperties().get(SOLR_CORE_NAME));

        solrServerConfiguration = new EmbeddedSolrServerConfiguration(solrHome, solrConfigFile, solrCoreName);
    }
View Full Code Here

    protected void preCreateRepository(Jcr jcr) {
        String path = getClass().getResource("/").getFile() + "/queryjcrtest";
        File f = new File(path);
        final SolrServer solrServer;
        try {
            solrServer = new EmbeddedSolrServerProvider(new EmbeddedSolrServerConfiguration(f.getPath(), "", "oak")).getSolrServer();
        } catch (Exception e) {
            throw new RuntimeException();
        }
        SolrServerProvider solrServerProvider = new SolrServerProvider() {
            @Override
View Full Code Here

*/
public class EmbeddedSolrServerProviderTest {

    @Test
    public void testEmbeddedSolrServerInitialization() throws Exception {
        EmbeddedSolrServerConfiguration solrServerConfiguration = new EmbeddedSolrServerConfiguration(getClass().getResource("/solr").getFile(),
                getClass().getResource("/solr/solr.xml").getFile(), "oak");
        EmbeddedSolrServerProvider embeddedSolrServerProvider = new EmbeddedSolrServerProvider(solrServerConfiguration);
        SolrServer solrServer = embeddedSolrServerProvider.getSolrServer();
        assertNotNull(solrServer);
        SolrPingResponse ping = solrServer.ping();
View Full Code Here

        if (httpPort != null && httpPort.length() > 0) {
            solrHttpPort = Integer.valueOf(httpPort);
        }
        solrContext = String.valueOf(componentContext.getProperties().get(SOLR_CONTEXT));

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

        try
        {
            HttpWagon wagon = (HttpWagon) getWagon();
            wagon.setHttpConfiguration(
                new HttpConfiguration().setAll( new HttpMethodConfiguration().setConnectionTimeout( 500 ) ) );

            Repository testRepository = new Repository();
            Random random = new Random( );
            testRepository.setUrl( "http://localhost:" + random.nextInt( 2048 ));
View Full Code Here

        return getProtocol() + "://localhost:" + getTestRepositoryPort();
    }

    protected void setHttpHeaders( StreamingWagon wagon, Properties properties )
    {
        HttpConfiguration config = new HttpConfiguration();

        HttpMethodConfiguration methodConfiguration = new HttpMethodConfiguration();
        methodConfiguration.setHeaders( properties );
        config.setAll( methodConfiguration );
        ( (HttpWagon) wagon ).setHttpConfiguration( config );
    }
View Full Code Here

    public void testSetPreemptiveAuthParamViaConfig()
    {
        HttpMethodConfiguration methodConfig = new HttpMethodConfiguration();
        //X TODO methodConfig.addParam( HttpClientParams.PREEMPTIVE_AUTHENTICATION, "%b,true" );

        HttpConfiguration config = new HttpConfiguration();
        config.setAll( methodConfig );

        TestWagon wagon = new TestWagon();
        wagon.setHttpConfiguration( config );

        HttpHead method = new HttpHead();
View Full Code Here

    {
        HttpMethodConfiguration methodConfig = new HttpMethodConfiguration();
        int maxRedirects = 2;
        methodConfig.addParam( ClientPNames.MAX_REDIRECTS, "%i," + maxRedirects );

        HttpConfiguration config = new HttpConfiguration();
        config.setAll( methodConfig );

        TestWagon wagon = new TestWagon();
        wagon.setHttpConfiguration( config );

        HttpHead method = new HttpHead();
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.index.solr.configuration.EmbeddedSolrServerConfiguration$HttpConfiguration

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.