Richard Walker created SOLR-13646:
-------------------------------------

             Summary: Documentation about plugin JARs in SolrCloud mode either 
incomplete or doesn't match available functionality
                 Key: SOLR-13646
                 URL: https://issues.apache.org/jira/browse/SOLR-13646
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: documentation, Plugin system, SolrCloud
    Affects Versions: 8.1.1
            Reporter: Richard Walker


(As originally "discussed" on mailing list at 
[http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201907.mbox/%3cae3e5dbe-0d38-4594-b82a-ceab4e024...@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
{code:java}
  <lib dir="..." regex="..." />
  <queryParser name="..." class="..." />
{code}
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:
{quote}Resources and plugins may be stored:
 * in ZooKeeper under a collection’s configset node (SolrCloud only);{quote}
Note: I'm _not_ trying to do the _third_ option listed, i.e.:
{quote} * in Solr’s Blob Store (SolrCloud only)", that uses the ".system" 
collection.{quote}
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...@mail.gmail.com%3e]

in which the second message (from Shawn Heisey) says:
{quote}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.
{quote}
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.)

Richard.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to