You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Joshan Mahmud <jo...@gmail.com> on 2016/03/03 14:54:34 UTC

Override Default Similarity and SolrCloud

Hi group!

I'm having an issue of deploying a custom jar in SolrCloud (v 5.3.0).

I have a working local Solr environment (v 5.3.0 - NOT SolrCloud) whereby I
have:

   - a jar containing one class CustomSimilarity which
   extends org.apache.lucene.search.similarities.DefaultSimilarity

   - the jar is placed in CORE\conf\lib

   - my solrconfig.xml has:
   <lib dir="./conf/lib" />

   - my schema.xml has:
   <similarity class="com.mycompany.CustomSimilarity" />

This all works fine locally, but if I Zookeeper upconfig my conf folder to
a SolrCloud envrionment which contains my schema, solrconfig and
lib\CustomSimilarity.jar and then reload my CORE then SolrCloud complains
that it cannot find: "com.mycompany.CustomSimilarity".

How can I get SOLR & Zookeeper to use my jar???

Any help would be greatly appreciated!

Thanks
Josh