<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Using spring-data-solr to Query Indexed Data on CDH 5.10 in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-spring-data-solr-to-Query-Indexed-Data-on-CDH-5-10/m-p/53804#M59398</link>
    <description>&lt;P&gt;By adding the annotation to my model(document) the problem was resolved.&lt;/P&gt;&lt;P&gt;@SolrDocument(solrCoreName = "party_name")&lt;BR /&gt;public class PartyName {&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
    <pubDate>Tue, 18 Apr 2017 13:16:27 GMT</pubDate>
    <dc:creator>imad87</dc:creator>
    <dc:date>2017-04-18T13:16:27Z</dc:date>
    <item>
      <title>Using spring-data-solr to Query Indexed Data on CDH 5.10</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-spring-data-solr-to-Query-Indexed-Data-on-CDH-5-10/m-p/53633#M59397</link>
      <description>&lt;LI-SPOILER&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;I am using spring-data-solr to query indexed solr data running on a Cloudera Hadoop cluser(CDH5.10) . The name of my collection is party_name. Below is the code I used to configure the Cloud client:&lt;BR /&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;@Configuration @EnableSolrRepositories(basePackages = { "org.nccourts.repository" }, multicoreSupport = true) public class SpringSolrConfig {&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;@Value("${spring.data.solr.zk-host}")
private String zkHost;

@Bean
public SolrClient solrClient() {
    return new CloudSolrClient(zkHost);
}

@Bean
public SolrTemplate solrTemplate(CloudSolrClient solrClient) throws Exception {
    solrClient.setDefaultCollection("party_name");
    return new SolrTemplate(solrClient);
}&lt;/PRE&gt;}&lt;P&gt;When I run my junit test, I am getting the following exception: org.springframework.data.solr.UncategorizedSolrException: Collection not found: &lt;STRONG&gt;partyname&lt;/STRONG&gt;; nested exception is org.apache.solr.common.SolrException: Collection not found: &lt;STRONG&gt;partyname&lt;/STRONG&gt; at org.springframework.data.solr.core.SolrTemplate.execute(SolrTemplate.java:215)&lt;/P&gt;&lt;FONT size="2"&gt;at org.springframework.data.solr.core.SolrTemplate.executeSolrQuery(SolrTemplate.java:1030)&lt;/FONT&gt;&lt;P&gt;Note the Collection not found:&lt;STRONG&gt; partyname&lt;/STRONG&gt;, but the collection name I entered is &lt;STRONG&gt;party_name&lt;/STRONG&gt;.&lt;BR /&gt;I am using springboot version 1.5.2 with the following dependency: compile('org.springframework.boot:spring-boot-starter-data-solr')&lt;/P&gt;&lt;P&gt;Any help or pointers are appreciated.&lt;/P&gt;&lt;FONT size="2" face="arial,helvetica,sans-serif"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/LI-SPOILER&gt;</description>
      <pubDate>Fri, 16 Sep 2022 11:27:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-spring-data-solr-to-Query-Indexed-Data-on-CDH-5-10/m-p/53633#M59397</guid>
      <dc:creator>imad87</dc:creator>
      <dc:date>2022-09-16T11:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using spring-data-solr to Query Indexed Data on CDH 5.10</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-spring-data-solr-to-Query-Indexed-Data-on-CDH-5-10/m-p/53804#M59398</link>
      <description>&lt;P&gt;By adding the annotation to my model(document) the problem was resolved.&lt;/P&gt;&lt;P&gt;@SolrDocument(solrCoreName = "party_name")&lt;BR /&gt;public class PartyName {&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 13:16:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-spring-data-solr-to-Query-Indexed-Data-on-CDH-5-10/m-p/53804#M59398</guid>
      <dc:creator>imad87</dc:creator>
      <dc:date>2017-04-18T13:16:27Z</dc:date>
    </item>
  </channel>
</rss>

