lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From King Rhoton <krho...@adobe.com>
Subject Re: custom plugin version
Date Fri, 03 Feb 2017 16:21:14 GMT
What we ended up doing was creating separate directories for each version of a plugin we had
written, and in each collection's solrconfig,xml, we add the path to the specific directory
we wanted that collection to use via the "<lib dir=..." tag.

> On Feb 3, 2017, at 2:40 AM, Andrea Gazzarini <gxsubs@gmail.com> wrote:
> 
> Hi Zaccheo,
> I don't think this is possible, this is something related with the classloader behavior,
and even if there's a "priority" rule in the JVM, I wouldn't rely on that in my application.
> That could be good in a dev environment where you can specify the "order" of the imported
libraries (e.g. Eclipse), but definitely not so good outside (IMO).
> 
> As far as I know, there's no a built-in way to declare the version of custom components,
but you could adopt the same approach of Lucene, with something like a Version class that
drives the behavior of your component.
> In this way you will have
> 
> * always one jar (better: unique classes FQNs), so no classloader issues
> * a behavior that changes depending on the configuration
> 
> Best,
> Andrea
> 
> On 03/02/17 10:57, Zaccheo Bagnati wrote:
>> Hi all,
>> I developed a custom DocTransformer that is loaded from a .jar in the core
>> "lib" directory. It works but I have now a problem with versioning:
>> 1. if lib directory contains different versions of the same .jar which one
>> is loaded? I tried putting both myplugins-1.0.0.jar and myplugins-1.0.1.jar
>> and I noticed that the oldest one is loaded. Is there a way to force
>> specific jar version to be loaded in solrconfig?
>> 2. More in general: is it possible to expose in solr the version number for
>> custom plugins?
>> Thank you in advance
>> 
> 


-----
King Rhoton, c/o Adobe, 601 Townsend, SF, CA 94103
415-832-4480 x24480
S&P support requests should go to search-eng@adobe.com


Mime
View raw message