Problem loading custom similarity class via blob API

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem loading custom similarity class via blob API

WebsterHomer
I have a need to override the default behavior of the BM25Similarty class.
It was trivial to create the class. My problem is that I cannot load it, at
least via the blob api as described here:
https://cwiki.apache.org/confluence/display/solr/Adding+Custom+Plugins+in+SolrCloud+Mode

I set enable.runtime.lib=true on my solr startup

I created the .system collection and uploaded a jar containing my class
following the instructions here:
https://cwiki.apache.org/confluence/display/solr/Blob+Store+API

I can see that the blob was created.

I added the runtime lib to my collection, and I can see it in the
configorelay.json file
Finally I added this line to the schema.xml file:
<similarity class="com.sial.similarity.SialBM25Similarity"
runtimeLib="true"/>

uploaded it to Zookeeper and reloaded the collection. only to get this
error:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
Could not load conf for core test-catalog-product-170724_shard1_replica1:
Can't load schema schema.xml: Error loading class
'com.sial.similarity.SialBM25Similarity'

What am I missing? Is this plugins api limited to components and request
handlers? If so that's a HUGE limitation, makes it just about useless.
I need it for this similarity and some filter factories, and having a
simple way to deploy code to solrcloud nodes that can be easily automated
would be great.

--


This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient,
you must not copy this message or attachment or disclose the contents to
any other person. If you have received this transmission in error, please
notify the sender immediately and delete the message and any attachment
from your system. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not accept liability for any omissions or errors in this
message which may arise as a result of E-Mail-transmission or for damages
resulting from any unauthorized changes of the content of this message and
any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not guarantee that this message is free of viruses and does
not accept liability for any damages caused by any virus transmitted
therewith.

Click http://www.emdgroup.com/disclaimer to access the German, French,
Spanish and Portuguese versions of this disclaimer.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem loading custom similarity class via blob API

WebsterHomer
The blob store api is indeed severely limited (near useless) by this:
https://issues.apache.org/jira/browse/SOLR-9175

On Thu, Aug 10, 2017 at 4:08 PM, Webster Homer <[hidden email]>
wrote:

> I have a need to override the default behavior of the BM25Similarty class.
> It was trivial to create the class. My problem is that I cannot load it, at
> least via the blob api as described here:
> https://cwiki.apache.org/confluence/display/solr/Adding+Custom+Plugins+in+
> SolrCloud+Mode
>
> I set enable.runtime.lib=true on my solr startup
>
> I created the .system collection and uploaded a jar containing my class
> following the instructions here:
> https://cwiki.apache.org/confluence/display/solr/Blob+Store+API
>
> I can see that the blob was created.
>
> I added the runtime lib to my collection, and I can see it in the
> configorelay.json file
> Finally I added this line to the schema.xml file:
> <similarity class="com.sial.similarity.SialBM25Similarity"
> runtimeLib="true"/>
>
> uploaded it to Zookeeper and reloaded the collection. only to get this
> error:
> org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
> Could not load conf for core test-catalog-product-170724_shard1_replica1:
> Can't load schema schema.xml: Error loading class 'com.sial.similarity.
> SialBM25Similarity'
>
> What am I missing? Is this plugins api limited to components and request
> handlers? If so that's a HUGE limitation, makes it just about useless.
> I need it for this similarity and some filter factories, and having a
> simple way to deploy code to solrcloud nodes that can be easily automated
> would be great.
>

--


This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient,
you must not copy this message or attachment or disclose the contents to
any other person. If you have received this transmission in error, please
notify the sender immediately and delete the message and any attachment
from your system. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not accept liability for any omissions or errors in this
message which may arise as a result of E-Mail-transmission or for damages
resulting from any unauthorized changes of the content of this message and
any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not guarantee that this message is free of viruses and does
not accept liability for any damages caused by any virus transmitted
therewith.

Click http://www.emdgroup.com/disclaimer to access the German, French,
Spanish and Portuguese versions of this disclaimer.
Loading...