(As originally "discussed" on mailing list at http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201907.mbox/%3cAE3E5DBE-0D38-4594-B82A-CEAB4E0244F2@ardc.edu.au%3e)
I'm trying to use a plugin JAR containing a custom query parser.
I've been able to get this to work the "simple" way, by putting the JAR in the file system, and specifying basic
values in solrconfig.xml. No problem doing it this way.
But I'm running in SolrCloud mode and I'd like to take advantage of an option that the user guide seems to offer at this page:
But, so far, I don't see how to make it work.
To be specific, I'm trying to use this idea:
Resources and plugins may be stored:
- in ZooKeeper under a collection’s configset node (SolrCloud only);
Note: I'm not trying to do the third option listed, i.e.:
- in Solr’s Blob Store (SolrCloud only)", that uses the ".system" collection.
The user guide seems to suggest that I can upload the JAR to the collection's config using zk cp:
"To upload a plugin or resource to a configset already stored on ZooKeeper, you can use bin/solr zk cp."
So, I've used zk cp to upload the JAR to zk:/configs/my_collection/my_plugin.jar
(I also tried various other subdirectories such as zk:/configs/my_collection/lib/my_plugin.jar)
So far, so good. But now how do I refer to the JAR in solrconfig.xml? The user guide doesn't really say.
I've tried specifying the location of the JAR with various values of <lib ...> element.
No success at all; I only get a ClassNotFoundException for the plugin class.
So, it seems that the documentation is at least missing information about how to specify the location of a plugin JAR stored "in ZooKeeper under a collection’s configset node".
in which the second message (from Shawn Heisey) says:
I actually do not know what the path for lib directives is relative to when running SolrCloud. Most things in a core config are relative to the location of the config file itself, but in this case, the config file is not on the filesystem at all, it's in zookeeper, and I don't think Solr can use jars in zookeeper.
So, if this is right, it seems that the documentation is in this case offering functionality that does not exist. (And, once again, I am not talking about "Solr’s Blob Store ... that uses the .system collection", which I don't want to use.)