Examples of EmbeddedSolrServer


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

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

            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

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

        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

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

                    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

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

        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

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

                    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

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

        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

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

                    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

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

    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

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

    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
Copyright © 2018 www.massapi.com. 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.