Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-13646

Documentation about plugin JARs in SolrCloud mode either incomplete or doesn't match available functionality




      (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

        <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:


      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".

      I found this earlier thread: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201701.mbox/%3cCAKHkODQV-y59+7M86oGVf1Feqj6iEiogp8TrhL1MG5fUAjL+MA@mail.gmail.com%3e

      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.)





            • Assignee:
              Richard.Walker@ands.org.au Richard Walker
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: