Package org.apache.solr.client.solrj.embedded

Examples of org.apache.solr.client.solrj.embedded.EmbeddedSolrServer


        System.setProperty("solr.solr.home", homeDirPath);
        System.setProperty("solr.data.dir", dataDirPath);
        coreContainer = new CoreContainer();
        coreContainer.load(homeDirPath, solrFile);
       
        server = new EmbeddedSolrServer(coreContainer, "js");
        server.deleteByQuery("*:*");
        server.commit();

        searchEngine = new SolrSearchEngineImpl(server, true, hfi);
    }
View Full Code Here


            descriptor.setSchemaName(schema.getResourceName());

            solrCore = new SolrCore(null, solrConfig.getDataDir(),
                    solrConfig, schema, descriptor);
            solrContainer.register("", solrCore, false);
            return new EmbeddedSolrServer(solrContainer, "");
        } catch(Exception ex) {
            log.error("\nFailed to start Solr server\n");
            throw ex;
        }
    }
View Full Code Here

        descriptor.setSchemaName(schema.getResourceName());

        SolrCore solrCore = new SolrCore(null, solrConfig.getDataDir(),
                solrConfig, schema, descriptor);
        solrContainer.register("", solrCore, false);
        return new EmbeddedSolrServer(solrContainer, "");
    }
View Full Code Here

TOP

Related Classes of org.apache.solr.client.solrj.embedded.EmbeddedSolrServer

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.