Hi, 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

  <lib dir="..." regex="..." />
  <queryParser name="..." class="..." />

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:

https://lucene.apache.org/solr/guide/8_1/resource-and-plugin-loading.html

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.

Could someone please tell me what I'm missing, i.e., what
I need to do to use a plugin JAR stored
"in ZooKeeper under a collection’s configset node"?

Richard.

Reply via email to