You can disable loading plugins by using a custom class loader that only
points to the 'lib' folder of the ES home, or includes the Elasticsearch
jars from dependency path, respectively.

Settings clientSettings = ImmutableSettings.settingsBuilder()
  .classLoader(yourcustomclassloader),
 ...);
NodeBuilder.nodeBuilder().local(true).settings(clientSettings).build();
...

Jörg

On Mon, Nov 3, 2014 at 6:50 PM, Laurent T. <lau.thou...@gmail.com> wrote:

> Hi,
>
> I have an ES plugin that basically intercepts POST requests on a specific
> path and builds ES queries depending on the post data before executing
> these and returning a result.
> I have some unit tests that create a local node to tests the queries. My
> problem is that it loads my plugin which I do not want.
>
> Is there any way I can avoid that ? Perhaps with some specific settings ?
>
> Here's how I'm currently getting the test es client:
>
> NodeBuilder.nodeBuilder().local(true).node().client()
>
>
> The reason I do not want it to load the plugin  is that it creates two
> instances of the plugin: one in the tests and one in the local node.
>
> Thanks
> Regards,
>
> Laurent
>
>  --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/57bbfb19-341c-4d39-9c90-218596406b75%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/57bbfb19-341c-4d39-9c90-218596406b75%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoG2WyMtYtHeUh8xBCuDE7%3DoR5Xq24TWXQAY53KKQ2H_Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to