Package org.apache.solr.client.solrj.impl

Examples of org.apache.solr.client.solrj.impl.HttpSolrServer


 
  public void startup() {
    if (this.updateServer == null) {
      //this.updateServer = new ConcurrentUpdateSolrServer(solrCollectionUrl,queueSize,numThreads);
      if ((queueSize == 1) && (numThreads == 1)) {
        this.updateServer = new HttpSolrServer(solrCollectionUrl);
      } else {
        this.updateServer = new CUServer(solrCollectionUrl,queueSize,numThreads);
      }
    }
  }
View Full Code Here


  protected void executeTask() throws Exception {
    TaskContext context = this.getContext();
    Connection con = null;
    try {
      // TODO: dbconnection, gptinstance name, gcinstancename
      queryServer = new HttpSolrServer(solrCollectionUrl);
      docPublisher = new DocPublisher(context,solrCollectionUrl,5000,10,1);
      this.docPublisher.startup();
     
      // TODO remove this
      //deleteDocs();
View Full Code Here

        return solrServer;
    }

    private SolrServer initializeWithExistingHttpServer() throws IOException, SolrServerException {
        // try basic Solr HTTP client
        HttpSolrServer httpSolrServer = new HttpSolrServer(remoteSolrServerConfiguration.getSolrHttpUrls()[0]);
        SolrPingResponse ping = httpSolrServer.ping();
        if (ping != null && 0 == ping.getStatus()) {
            return httpSolrServer;
        } else {
            throw new IOException("the found HTTP Solr server is not alive");
        }
View Full Code Here

    public SolrServer getSolrServer() throws Exception {
        if (solrServer == null) {
            String url = SolrServerConfigurationDefaults.LOCAL_BASE_URL + ':' +
                    SolrServerConfigurationDefaults.HTTP_PORT + SolrServerConfigurationDefaults.CONTEXT +
                    '/' + SolrServerConfigurationDefaults.CORE_NAME;
            solrServer = new HttpSolrServer(url);
        }
        return solrServer;
    }
View Full Code Here

  }

  @Test(expected = IllegalArgumentException.class)
  public void testGetRepositoryOfUnmanageableType() {

    SolrTemplate template = new SolrTemplate(new HttpSolrServer("http://solrserver:8983/solr"), null);
    template.afterPropertiesSet();
    new SolrRepositoryFactory(template).getRepository(UnmanagedEntityRepository.class);
  }
View Full Code Here

  private SolrServerFactory factory;
  private SolrSchemaWriter schemaWriter;

  @Before
  public void setUp() {
    solrServer = new HttpSolrServer("http://localhost:8983/solr");
    factory = new MulticoreSolrServerFactory(solrServer);
    schemaWriter = new SolrSchemaWriter(factory);
  }
View Full Code Here

  private SolrTemplate template;

  @Before
  public void setUp() {
    this.template = new SolrTemplate(new HttpSolrServer("http://localhost:8983/solr"));
    template.setSchemaCreationFeatures(Collections.singletonList(Feature.CREATE_MISSING_FIELDS));
    template.afterPropertiesSet();

    template.delete(new SimpleQuery("*:*"));
    template.commit();
 
View Full Code Here

  }

  @Test(expected = IllegalArgumentException.class)
  public void testInitRepositoryWithNullEntityClass() {
    new SimpleSolrRepository<ExampleSolrBean, String>(new SolrTemplate(
        new HttpSolrServer("http://localhost:8080/solr"), null), null);
  }
View Full Code Here

        new HttpSolrServer("http://localhost:8080/solr"), null), null);
  }

  @Test
  public void testInitRepository() {
    repository = new SimpleSolrRepository<ExampleSolrBean, String>(new SolrTemplate(new HttpSolrServer(
        "http://localhost:8080/solr"), null), ExampleSolrBean.class);
    Assert.assertEquals(ExampleSolrBean.class, repository.getEntityClass());
  }
View Full Code Here

  private static final String URL = "http://solr.server.url";
  private SolrServer solrServer;

  @Before
  public void setUp() throws MalformedURLException {
    solrServer = new HttpSolrServer(URL);
  }
View Full Code Here

TOP

Related Classes of org.apache.solr.client.solrj.impl.HttpSolrServer

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.