I created a plugin that tries to replace the standard index action with my
own implementation. In my plugin, I have the following method: @Override
public void processModule(Module module) {
logger.info("Processing module");
if (module instanceof ActionModule) {
ActionModule actionModule = (ActionModule) module;
logger.info("Found action module");
actionModule.registerAction(IndexAction.INSTANCE, CustomIndexAction.class);
logger.info("Registered custom index action in
place of standard index action");
}
}
I can see all the log statements during startup. However, the custom action
never gets executed. I debugged the custom plugin and action in an embedded
ElasticSearch and I noticed that the processModule() of my custom plugin
gets called first and then the configure() method of the ActionModule is
called overriding my custom action.
I cannot say if it is intentional or not, but it definitely seems like your
custom action is getting added to the action map first, and then
getting overridden later.
I wonder if the flow would be different if you used the onModule method
instead of processModule:
public void onModule(ActionModule actionModule ) {
actionModule.registerAction(IndexAction.INSTANCE,
I created a plugin that tries to replace the standard index action with my
own implementation. In my plugin, I have the following method: @Override
public void processModule(Module module) {
logger.info("Processing module");
if (module instanceof ActionModule) {
ActionModule actionModule = (ActionModule) module;
logger.info("Found action module");
actionModule.registerAction(IndexAction.INSTANCE, CustomIndexAction.class);
logger.info("Registered custom index action in
place of standard index action");
}
}
I can see all the log statements during startup. However, the custom
action never gets executed. I debugged the custom plugin and action in an
embedded Elasticsearch and I noticed that the processModule() of my custom
plugin gets called first and then the configure() method of the
ActionModule is called overriding my custom action.
I cannot find onModule() anywhere in the Elasticsearch API.
Andreas
On Monday, October 8, 2012 1:10:37 PM UTC-7, Ivan Brusic wrote:
I cannot say if it is intentional or not, but it definitely seems like
your custom action is getting added to the action map first, and then
getting overridden later.
I wonder if the flow would be different if you used the onModule method
instead of processModule:
public void onModule(ActionModule actionModule ) {
actionModule.registerAction(IndexAction.INSTANCE,
CustomIndexAction.class);
}
Probably not, but worth a try.
--
Ivan
On Mon, Oct 8, 2012 at 11:56 AM, Andreas Christoforides < andreas.chr...@gmail.com <javascript:>> wrote:
I created a plugin that tries to replace the standard index action with
my own implementation. In my plugin, I have the following method: @Override
public void processModule(Module module) {
actionModule.registerAction(IndexAction.INSTANCE, CustomIndexAction.class);
logger.info("Registered custom index action in
place of standard index action");
}
}
I can see all the log statements during startup. However, the custom
action never gets executed. I debugged the custom plugin and action in an
embedded Elasticsearch and I noticed that the processModule() of my custom
plugin gets called first and then the configure() method of the
ActionModule is called overriding my custom action.
I cannot find onModule() anywhere in the Elasticsearch API.
Andreas
On Monday, October 8, 2012 1:10:37 PM UTC-7, Ivan Brusic wrote:
I cannot say if it is intentional or not, but it definitely seems like
your custom action is getting added to the action map first, and then
getting overridden later.
I wonder if the flow would be different if you used the onModule method
instead of processModule:
public void onModule(ActionModule actionModule ) {
actionModule.registerAction(**IndexAction.INSTANCE,
CustomIndexAction.class);
}
Probably not, but worth a try.
--
Ivan
On Mon, Oct 8, 2012 at 11:56 AM, Andreas Christoforides <
andreas.chr...@gmail.**com> wrote:
I created a plugin that tries to replace the standard index action with
my own implementation. In my plugin, I have the following method: @Override
public void processModule(Module module) {
logger.info("Processing module");
if (module instanceof ActionModule) {
ActionModule actionModule = (ActionModule) module;
logger.info("Found action module");
actionModule.registerAction(**IndexAction.INSTANCE, **
CustomIndexAction.class);
logger.info("Registered custom index action in
place of standard index action");
}
}
I can see all the log statements during startup. However, the custom
action never gets executed. I debugged the custom plugin and action in an
embedded Elasticsearch and I noticed that the processModule() of my custom
plugin gets called first and then the configure() method of the
ActionModule is called overriding my custom action.
I added the onModule method in the plugin. Both methods are called before
the initialization of the ActionModule.
I am trying to change the way the index action executes Specifically, I
would like to change the routing before the index action executes.
Any other way I can accomplish that besides using a plugin that registers a
custom action?
Andreas
On Monday, October 8, 2012 1:24:44 PM UTC-7, Andreas Christoforides wrote:
Ivan,
I cannot find onModule() anywhere in the Elasticsearch API.
Andreas
On Monday, October 8, 2012 1:10:37 PM UTC-7, Ivan Brusic wrote:
I cannot say if it is intentional or not, but it definitely seems like
your custom action is getting added to the action map first, and then
getting overridden later.
I wonder if the flow would be different if you used the onModule method
instead of processModule:
public void onModule(ActionModule actionModule ) {
actionModule.registerAction(IndexAction.INSTANCE,
I created a plugin that tries to replace the standard index action with
my own implementation. In my plugin, I have the following method: @Override
public void processModule(Module module) {
actionModule.registerAction(IndexAction.INSTANCE, CustomIndexAction.class);
logger.info("Registered custom index action in
place of standard index action");
}
}
I can see all the log statements during startup. However, the custom
action never gets executed. I debugged the custom plugin and action in an
embedded Elasticsearch and I noticed that the processModule() of my custom
plugin gets called first and then the configure() method of the
ActionModule is called overriding my custom action.
On Monday, October 8, 2012 1:50:18 PM UTC-7, Andreas Christoforides wrote:
I added the onModule method in the plugin. Both methods are called before
the initialization of the ActionModule.
I am trying to change the way the index action executes Specifically, I
would like to change the routing before the index action executes.
Any other way I can accomplish that besides using a plugin that registers
a custom action?
Andreas
On Monday, October 8, 2012 1:24:44 PM UTC-7, Andreas Christoforides wrote:
Ivan,
I cannot find onModule() anywhere in the Elasticsearch API.
Andreas
On Monday, October 8, 2012 1:10:37 PM UTC-7, Ivan Brusic wrote:
I cannot say if it is intentional or not, but it definitely seems like
your custom action is getting added to the action map first, and then
getting overridden later.
I wonder if the flow would be different if you used the onModule method
instead of processModule:
public void onModule(ActionModule actionModule ) {
actionModule.registerAction(IndexAction.INSTANCE,
I created a plugin that tries to replace the standard index action with
my own implementation. In my plugin, I have the following method: @Override
public void processModule(Module module) {
actionModule.registerAction(IndexAction.INSTANCE, CustomIndexAction.class);
logger.info("Registered custom index action in
place of standard index action");
}
}
I can see all the log statements during startup. However, the custom
action never gets executed. I debugged the custom plugin and action in an
embedded Elasticsearch and I noticed that the processModule() of my custom
plugin gets called first and then the configure() method of the
ActionModule is called overriding my custom action.
On Tuesday, October 9, 2012 9:22:06 AM UTC-7, Andreas Christoforides wrote:
Should I submit a feature request/issue for this?
On Monday, October 8, 2012 1:50:18 PM UTC-7, Andreas Christoforides wrote:
I added the onModule method in the plugin. Both methods are called before
the initialization of the ActionModule.
I am trying to change the way the index action executes Specifically, I
would like to change the routing before the index action executes.
Any other way I can accomplish that besides using a plugin that registers
a custom action?
Andreas
On Monday, October 8, 2012 1:24:44 PM UTC-7, Andreas Christoforides wrote:
Ivan,
I cannot find onModule() anywhere in the Elasticsearch API.
Andreas
On Monday, October 8, 2012 1:10:37 PM UTC-7, Ivan Brusic wrote:
I cannot say if it is intentional or not, but it definitely seems like
your custom action is getting added to the action map first, and then
getting overridden later.
I wonder if the flow would be different if you used the onModule method
instead of processModule:
public void onModule(ActionModule actionModule ) {
actionModule.registerAction(IndexAction.INSTANCE,
I created a plugin that tries to replace the standard index action
with my own implementation. In my plugin, I have the following method: @Override
public void processModule(Module module) {
actionModule.registerAction(IndexAction.INSTANCE, CustomIndexAction.class);
logger.info("Registered custom index action
in place of standard index action");
}
}
I can see all the log statements during startup. However, the custom
action never gets executed. I debugged the custom plugin and action in an
embedded Elasticsearch and I noticed that the processModule() of my custom
plugin gets called first and then the configure() method of the
ActionModule is called overriding my custom action.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.