Package org.springframework.data.solr.core

Examples of org.springframework.data.solr.core.SolrTemplate


  private ExampleSolrBeanRepository repository;

  @Before
  public void setUp() {
    repository = new ExampleSolrBeanRepository();
    SolrTemplate template = new SolrTemplate(solrServer, null);
    template.afterPropertiesSet();
    repository.setSolrOperations(template);
  }
View Full Code Here


  private SolrTemplate solrTemplate;

  @Before
  public void setUp() throws IOException, ParserConfigurationException, SAXException {
    solrTemplate = new SolrTemplate(solrServer, null);
    solrTemplate.afterPropertiesSet();
  }
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

    new SimpleSolrRepository<ExampleSolrBean, String>(null);
  }

  @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

  public ExternalServerWithManagedSchemaRule(String baseUrl) {
    this.baseUrl = baseUrl;
  }

  public ExternalServerWithManagedSchemaRule init() {
    SolrTemplate template = new SolrTemplate(new HttpSolrServer(baseUrl));

    try {
      String schemaName = template.getSchemaName("collection1");
      if (!schemaName.equalsIgnoreCase("example-schemaless")) {
        errMsg = "Expected to run in schemaless mode";
      }
    } catch (Exception e) {
      errMsg = "Solr Server not running - " + e.getMessage();
View Full Code Here

TOP

Related Classes of org.springframework.data.solr.core.SolrTemplate

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.