Norconex / committer-solr

Solr implementation of Norconex Committer. Should also work with any Solr-based products, such as LucidWorks.
https://opensource.norconex.com/committers/solr/
Apache License 2.0
3 stars 5 forks source link

How to integrate solr cloud? #20

Open nitinsinghit opened 3 years ago

nitinsinghit commented 3 years ago

Hi All,

I have Norconex HTTP collector configured with Solr Committer. But I updated standalone solr with solr cloud and not sure how I can connect? Below is the xml file where solr committer is configured. Please guide

<committer class="com.norconex.committer.solr.SolrCommitter">
            <!-- <solrClientType>CloudSolrClient</solrClientType>  -->
            <solrURL>https://my-standalone-solr:8984/solr/sample_techproducts_configs/</solrURL>
            <sourceReferenceField keep="false">document.reference</sourceReferenceField>
            <targetReferenceField>id</targetReferenceField>
            <targetContentField>content</targetContentField>
            <solrUpdateURLParams>
              <param name="fm.ds">927df36b4c51625714</param>
            </solrUpdateURLParams>

          </committer>

Thanks

essiembre commented 3 years ago

That would be a bug with <solrClientType>CloudSolrClient</solrClientType> not having an option to specify a collection name.

Don't worry, until it's fixed, you can still use the Committer with SolrCloud. Specifying Zookeeper nodes with CloudSolrClient is only for first detecting the Solr endpoints available. After the initial detection, it uses the same Solr URLs you would have configured using the default LB_HTTP. See Solr JavaDoc for more context: https://solr.apache.org/docs/8_1_0/solr-solrj/org/apache/solr/client/solrj/impl/CloudSolrClient.html

So using the default client type with Solr URLs (comma-separated) instead of Zookeeper nodes will do the same.

Specifying Zookeeper endpoints is an advantage if you know they are more stable and/or do not change as often as the Solr ones, but not a mandated way to connect with SolrCloud.