Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting error: "No collection param specified on request and no default collection has been set." #19

Open
hectoralicea opened this issue Mar 22, 2021 · 1 comment

Comments

@hectoralicea
Copy link

I'm trying to use a zookeeper Solr Cloud destination for my norconex Committer

<solrClientType>CloudSolrClient</solrClientType>

and cannot understand how I tell the com.norconex.committer.solr.SolrCommitter XML fragment which collection to commit to when the <solrURL> that's provided is simply a comma delimited list of hosts with no URL there for no collection name attached to the URL.

 *   <dt>CloudSolrClient</dt>
 *     <dd>For use with a SolrCloud cluster. Needs a comma-separated list
 *         of Zookeeper hosts.</dd>

as shown here in the comments

The error I'm getting is

com.norconex.committer.core.CommitterException: Cannot index document batch to Solr.
	at com.norconex.committer.solr.SolrCommitter.commitBatch(SolrCommitter.java:400)
	at com.norconex.committer.core.AbstractBatchCommitter.commitAndCleanBatch(AbstractBatchCommitter.java:179)
	at com.norconex.committer.core.AbstractBatchCommitter.cacheOperationAndCommitIfReady(AbstractBatchCommitter.java:208)
	at com.norconex.committer.core.AbstractBatchCommitter.commitDeletion(AbstractBatchCommitter.java:148)
	at com.norconex.committer.core.AbstractFileQueueCommitter.commit(AbstractFileQueueCommitter.java:225)
	at com.norconex.collector.core.crawler.AbstractCrawler.execute(AbstractCrawler.java:274)
	at com.norconex.collector.core.crawler.AbstractCrawler.doExecute(AbstractCrawler.java:228)
	at com.norconex.collector.core.crawler.AbstractCrawler.startExecution(AbstractCrawler.java:184)
	at com.norconex.jef4.job.AbstractResumableJob.execute(AbstractResumableJob.java:49)
	at com.norconex.jef4.suite.JobSuite.runJob(JobSuite.java:354)
	at com.norconex.jef4.suite.JobSuite.doExecute(JobSuite.java:293)
	at com.norconex.jef4.suite.JobSuite.execute(JobSuite.java:166)
	at com.norconex.collector.core.AbstractCollector.start(AbstractCollector.java:150)
	at com.norconex.collector.core.AbstractCollectorLauncher.launch(AbstractCollectorLauncher.java:95)
	at com.norconex.collector.http.HttpCollector.main(HttpCollector.java:74)
Caused by: org.apache.solr.client.solrj.SolrServerException: No collection param specified on request and no default collection has been set.
	at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.directUpdate(BaseCloudSolrClient.java:473)
	at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.sendRequest(BaseCloudSolrClient.java:1037)
	at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.requestWithRetryOnStaleState(BaseCloudSolrClient.java:897)
	at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.request(BaseCloudSolrClient.java:829)
	at org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1290)
	at com.norconex.committer.solr.SolrCommitter.commitBatch(SolrCommitter.java:394)
	... 14 more

my xml fragment for SolrCommitter is

      <!-- Decide what to do with your files by specifying a Committer. -->
      <committer class="com.norconex.committer.solr.SolrCommitter">
        <solrClientType>CloudSolrClient</solrClientType>
        <solrURL>172.25.124.190:2181,172.25.124.191:2181,172.25.124.192:2181</solrURL>
        <sourceReferenceField keep="false">document.reference</sourceReferenceField>
        <targetReferenceField>id</targetReferenceField>
        <targetContentField>content</targetContentField>
        <solrUpdateURLParams>
          <param name="fm.ds">927df3075b544785892c6b4c51625714</param>
          <param name="defaultCollection">sample_techproducts_configs</param>
        </solrUpdateURLParams>    
        <commitBatchSize>5</commitBatchSize>
        <queueSize>5</queueSize>
        <maxRetries>2</maxRetries>
        <maxRetryWait>1000</maxRetryWait>
      </committer>
@essiembre
Copy link
Contributor

Duplicate of #20

@essiembre essiembre marked this as a duplicate of #20 Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants