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

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


  private static final Logger
  logger = LoggerFactory.getLogger(SolrServerWrapper.class);

  public SolrServerWrapper(final CoreContainer coreContainer) {
    this.coreContainer = coreContainer;
    server = new EmbeddedSolrServer(coreContainer, "");
  }
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

        try {
            coreContainer.load(SOLR_HOME_PATH, new File(SOLRCONFIG_PATH));
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
        return new EmbeddedSolrServer(coreContainer, "oak");
    }
View Full Code Here

                    coreContainer.load(solrHomePath, new File(solrConfigPath));
                } finally {
                    Thread.currentThread().setContextClassLoader(classLoader);
                }

                EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer, coreName);
                if (OakSolrUtils.checkServerAlive(server)) {
                    return server;
                } else {
                    throw new IOException("the embedded Solr server is not alive");
                }
View Full Code Here

        try {
            coreContainer.load(SOLR_HOME_PATH, new File(SOLRCONFIG_PATH));
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
        return new EmbeddedSolrServer(coreContainer, "oak");
    }
View Full Code Here

                    coreContainer.load(solrHomePath, new File(solrConfigPath));
                } finally {
                    Thread.currentThread().setContextClassLoader(classLoader);
                }

                EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer, coreName);
                if (server.ping().getStatus() == 0) {
                    return server;
                } else {
                    throw new IOException("the embedded Solr server is not alive");
                }
            }
View Full Code Here

        try {
            coreContainer.load(homePath, new File(SolrServerProvider.class.getResource(SOLRCONFIG_PATH).getFile()));
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
        return new EmbeddedSolrServer(coreContainer, "oak");
    }
View Full Code Here

                    coreContainer.load(solrHomePath, new File(solrConfigPath));
                } finally {
                    Thread.currentThread().setContextClassLoader(classLoader);
                }

                EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer, coreName);
                if (server.ping().getStatus() == 0) {
                    return server;
                } else {
                    throw new IOException("the embedded Solr server is not alive");
                }
            }
View Full Code Here

    CoreContainer container = new CoreContainer(loader);
    CoreDescriptor descriptor = new CoreDescriptor(container, "cname", ".");
    SolrCore core = container.create(descriptor);
    container.register(core.getName(), core, false);

    solr = new EmbeddedSolrServer(container, core.getName());
  }
View Full Code Here

    CoreDescriptor descriptor = new CoreDescriptor(container,
        "cname", "." );
    SolrCore core = container.create(descriptor);
    container.register( core.getName(), core, false );

    solr = new EmbeddedSolrServer(container, core.getName());
  }
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.