Function score code is perhaps the easiest to write for Elasticsearch. You
do not need to create a plugin for it, simply write the code with the
appropriate classes and deploy at as a jar to Elasticsearch's lib
directory. Done. That said, I still prefer to write native scripts as
plugins because they are logged as plugins on server startup. Far easier to
debug if something goes wrong.
Good idea! One thing I am not quite clear is that writing a custom
ScoreFunction, I will have to modify elasticsearch source code and compile
it right? Or there is any other way to do it? Thank you.
I mean, you can add a MyOwnFunctionBuilder/MyOwnFunctionParser to
Elasticsearch via plugin. See
package org.elasticsearch.index.query.functionscore for the standard
implementations.
The functionscore code is masterpiece quality - no need to modify existing
code! It is pluggable.
A close example to what you want to achieve is
org.elasticsearch.index.query.functionscore.fieldvaluefactor
This would be an alternative to the AbstractSearchScript call
implementation path you have chosen so far
Good idea! One thing I am not quite clear is that writing a custom
ScoreFunction, I will have to modify elasticsearch source code and compile
it right? Or there is any other way to do it? Thank you.
I mean, you can add a MyOwnFunctionBuilder/MyOwnFunctionParser to
Elasticsearch via plugin. See
package org.elasticsearch.index.query.functionscore for the standard
implementations.
The functionscore code is masterpiece quality - no need to modify existing
code! It is pluggable.
A close example to what you want to achieve is
org.elasticsearch.index.query.functionscore.fieldvaluefactor
This would be an alternative to the AbstractSearchScript call
implementation path you have chosen so far
Good idea! One thing I am not quite clear is that writing a custom
ScoreFunction, I will have to modify elasticsearch source code and compile
it right? Or there is any other way to do it? Thank you.
I have implemented a function score based conditional boost plugin for
demonstration.
Very useful for faking relevance scoring, in dependency of document field
values which were originally not meant to contribute for boosting.
A list of boost values can be specified in dependency of indexed values in
other fields in the document.
It may not fit exactly to your needs, but it should show the solution in
general - no reindexing, no scripting required. Instead, the plugin is
using the function score Java API.
I was trying to install this plugin on ES v1.3.1. I am getting the errors
similar to below. Can you please tell me what has changed and how I can
rectify? Thanks,
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeClusterAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeClusterAdminClient
for parameter 1 at
org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeIndicesAdminClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:36)
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeIndicesAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeIndicesAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:37)
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeIndicesAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeIndicesAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)
No implementation for org.elasticsearch.action.GenericAction annotated
with @org.elasticsearch.common.inject.multibindings.Element(setNam
e=,uniqueId=275) was bound.
at org.elasticsearch.action.ActionModule.configure(ActionModule.java:304)
An exception was caught and reported. Message: null
at
org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)
9 errors
at
org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:344)
at
org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:151)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:102)
at
org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)
at
org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)
at
org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:59)
at
org.elasticsearch.node.internal.InternalNode.(InternalNode.java:192)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:70)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:203)
at
org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.lang.reflect.MalformedParameterizedTypeException
at
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:58)
at
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.(ParameterizedTypeImpl.java:51)
at
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:92)
at
sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105)
at
sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140)
at
sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at
sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:86)
at java.lang.Class.getGenericSuperclass(Class.java:764)
at
org.elasticsearch.common.inject.internal.MoreTypes.getGenericSupertype(MoreTypes.java:390)
at
org.elasticsearch.common.inject.TypeLiteral.getSupertype(TypeLiteral.java:262)
at
org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:341)
at
org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:287)
at
org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:309)
at
org.elasticsearch.common.inject.internal.BindingBuilder.toInstance(BindingBuilder.java:78)
at
org.elasticsearch.action.ActionModule.configure(ActionModule.java:304)
at
org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)
at
org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:204)
at
org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:85)
at
org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)
... 8 more
Thanks,
Sandeep
On Thursday, 5 June 2014 02:15:37 UTC+5:30, Jörg Prante wrote:
Absolutely, agreed.
The docs are sparse in my simple plugin too. I try to find some time to
add sample code for all the variants and explain the differences.
Jörg
On Wed, Jun 4, 2014 at 6:22 PM, Ivan Brusic <iv...@brusic.com
<javascript:>> wrote:
Jörg, thanks for the plugin to help as a starting point for plugin
development.
Although I have built a few plugins during the years, they were river or
analysis plugins, which are fairly easy. Writing a custom action required a
lot more digging, especially since there are very few to learn from. I
still would like to see a write-up regarding the different families of
transport actions: BroadcastOperationRequest, MasterNodeOperationRequest, NodesOperationRequest, SingleShardOperationRequest, SingleCustomOperationRequest,
etc. What is the difference? I understand it now, but it should be
documented. There is little documentation about the internals and there are
no code level comments. I always meant to experiment with the different
action hierarchies via simple plugins and document my findings. Perhaps one
day...
You need resources on all nodes that hold shards, you can not do it
with just one instance, because ES index is distributed. Rescoring would be
very expensive if you did it on an extra central instance with an extra
scatter/gather phase. It is also very expensive in scripting.
Not sure how your code looks like though, maybe you can share it with
the community?
Jörg
On Wed, Jun 4, 2014 at 2:55 AM, virgil <virg...@gmail.com <javascript:>
wrote:
The problem is that only one copy of HashMap is needed to customize
score of
all documents in the cluster. But as we have to install the plugin on
all
nodes, the actual memory used is multiplied by the number of nodes in
cluster. I try to figure out one way to save the memory. Tried on
non-data
node, but it seems not working.
I was trying to install this plugin on ES v1.3.1. I am getting the errors
similar to below. Can you please tell me what has changed and how I can
rectify? Thanks,
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeClusterAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeClusterAdminClient
for parameter 1 at
org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeIndicesAdminClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:36)
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeIndicesAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeIndicesAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:37)
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeIndicesAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeIndicesAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)
No implementation for org.elasticsearch.action.GenericAction annotated
with @org.elasticsearch.common.inject.multibindings.Element(setNam
e=,uniqueId=275) was bound.
at org.elasticsearch.action.ActionModule.configure(ActionModule.java:304)
An exception was caught and reported. Message: null
at
org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)
9 errors
at
org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:344)
at
org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:151)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:102)
at
org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)
at
org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)
at
org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:59)
at
org.elasticsearch.node.internal.InternalNode.(InternalNode.java:192)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:70)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:203)
at
org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.lang.reflect.MalformedParameterizedTypeException
at
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:58)
at
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.(ParameterizedTypeImpl.java:51)
at
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:92)
at
sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105)
at
sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140)
at
sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at
sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:86)
at java.lang.Class.getGenericSuperclass(Class.java:764)
at
org.elasticsearch.common.inject.internal.MoreTypes.getGenericSupertype(MoreTypes.java:390)
at
org.elasticsearch.common.inject.TypeLiteral.getSupertype(TypeLiteral.java:262)
at
org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:341)
at
org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:287)
at
org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:309)
at
org.elasticsearch.common.inject.internal.BindingBuilder.toInstance(BindingBuilder.java:78)
at
org.elasticsearch.action.ActionModule.configure(ActionModule.java:304)
at
org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)
at
org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:204)
at
org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:85)
at
org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)
... 8 more
Thanks,
Sandeep
On Thursday, 5 June 2014 02:15:37 UTC+5:30, Jörg Prante wrote:
Absolutely, agreed.
The docs are sparse in my simple plugin too. I try to find some time to
add sample code for all the variants and explain the differences.
Jörg
On Wed, Jun 4, 2014 at 6:22 PM, Ivan Brusic iv...@brusic.com wrote:
Jörg, thanks for the plugin to help as a starting point for plugin
development.
Although I have built a few plugins during the years, they were river or
analysis plugins, which are fairly easy. Writing a custom action required a
lot more digging, especially since there are very few to learn from. I
still would like to see a write-up regarding the different families of
transport actions: BroadcastOperationRequest,
MasterNodeOperationRequest, NodesOperationRequest,
SingleShardOperationRequest, SingleCustomOperationRequest, etc. What is
the difference? I understand it now, but it should be documented. There is
little documentation about the internals and there are no code level
comments. I always meant to experiment with the different
action hierarchies via simple plugins and document my findings. Perhaps one
day...
You need resources on all nodes that hold shards, you can not do it
with just one instance, because ES index is distributed. Rescoring would be
very expensive if you did it on an extra central instance with an extra
scatter/gather phase. It is also very expensive in scripting.
The problem is that only one copy of HashMap is needed to customize
score of
all documents in the cluster. But as we have to install the plugin on
all
nodes, the actual memory used is multiplied by the number of nodes in
cluster. I try to figure out one way to save the memory. Tried on
non-data
node, but it seems not working.
Just wondering what changed so much in 1.3? Is there sort of a quick fix?
Or else, will just wait for an update from you.
Thanks,
Sandeep
On Wednesday, 10 September 2014 15:20:57 UTC+5:30, Jörg Prante wrote:
The plugin is for 1.2, I have to update the simple action plugin to
Elasticsearch 1.3
Thanks for the reminder
Jörg
On Wed, Sep 10, 2014 at 11:08 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch <elasti...@googlegroups.com <javascript:>> wrote:
Hi Jorg,
I was trying to install this plugin on ES v1.3.1. I am getting the errors
similar to below. Can you please tell me what has changed and how I can
rectify? Thanks,
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeClusterAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeClusterAdminClient
for parameter 1 at
org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeIndicesAdminClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:36)
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeIndicesAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeIndicesAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:37)
No implementation for
java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at
org.elasticsearch.client.node.NodeIndicesAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeIndicesAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeAdminClient
for parameter 2 at
org.elasticsearch.client.node.NodeClient.(Unknown Source)
at
org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)
No implementation for org.elasticsearch.action.GenericAction annotated
with @org.elasticsearch.common.inject.multibindings.Element(setNam
e=,uniqueId=275) was bound.
at
org.elasticsearch.action.ActionModule.configure(ActionModule.java:304)
An exception was caught and reported. Message: null
at
org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)
9 errors
at
org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:344)
at
org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:151)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:102)
at
org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)
at
org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)
at
org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:59)
at
org.elasticsearch.node.internal.InternalNode.(InternalNode.java:192)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:70)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:203)
at
org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.lang.reflect.MalformedParameterizedTypeException
at
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:58)
at
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.(ParameterizedTypeImpl.java:51)
at
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:92)
at
sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105)
at
sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140)
at
sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at
sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:86)
at java.lang.Class.getGenericSuperclass(Class.java:764)
at
org.elasticsearch.common.inject.internal.MoreTypes.getGenericSupertype(MoreTypes.java:390)
at
org.elasticsearch.common.inject.TypeLiteral.getSupertype(TypeLiteral.java:262)
at
org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:341)
at
org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:287)
at
org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:309)
at
org.elasticsearch.common.inject.internal.BindingBuilder.toInstance(BindingBuilder.java:78)
at
org.elasticsearch.action.ActionModule.configure(ActionModule.java:304)
at
org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)
at
org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:204)
at
org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:85)
at
org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)
... 8 more
Thanks,
Sandeep
On Thursday, 5 June 2014 02:15:37 UTC+5:30, Jörg Prante wrote:
Absolutely, agreed.
The docs are sparse in my simple plugin too. I try to find some time to
add sample code for all the variants and explain the differences.
Jörg
On Wed, Jun 4, 2014 at 6:22 PM, Ivan Brusic iv...@brusic.com wrote:
Jörg, thanks for the plugin to help as a starting point for plugin
development.
Although I have built a few plugins during the years, they were river
or analysis plugins, which are fairly easy. Writing a custom action
required a lot more digging, especially since there are very few to learn
from. I still would like to see a write-up regarding the different families
of transport actions: BroadcastOperationRequest,
MasterNodeOperationRequest, NodesOperationRequest,
SingleShardOperationRequest, SingleCustomOperationRequest, etc. What
is the difference? I understand it now, but it should be documented. There
is little documentation about the internals and there are no code level
comments. I always meant to experiment with the different
action hierarchies via simple plugins and document my findings. Perhaps one
day...
You need resources on all nodes that hold shards, you can not do it
with just one instance, because ES index is distributed. Rescoring would be
very expensive if you did it on an extra central instance with an extra
scatter/gather phase. It is also very expensive in scripting.
The problem is that only one copy of HashMap is needed to customize
score of
all documents in the cluster. But as we have to install the plugin
on all
nodes, the actual memory used is multiplied by the number of nodes in
cluster. I try to figure out one way to save the memory. Tried on
non-data
node, but it seems not working.
Just wondering what changed so much in 1.3? Is there sort of a quick fix?
Or else, will just wait for an update from you.
Thanks,
Sandeep
On Wednesday, 10 September 2014 15:20:57 UTC+5:30, Jörg Prante wrote:
The plugin is for 1.2, I have to update the simple action plugin to
Elasticsearch 1.3
Thanks for the reminder
Jörg
On Wed, Sep 10, 2014 at 11:08 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch elasti...@googlegroups.com wrote:
Hi Jorg,
I was trying to install this plugin on ES v1.3.1. I am getting the
errors similar to below. Can you please tell me what has changed and how I
can rectify? Thanks,
No implementation for java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at org.elasticsearch.client.node.
NodeClusterAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeClusterAdminClient
for parameter 1 at org.elasticsearch.client.node.NodeAdminClient.(Unknown
Source)
while locating org.elasticsearch.client.node.NodeAdminClient
for parameter 2 at org.elasticsearch.client.node.NodeClient.(Unknown
Source)
at org.elasticsearch.client.node.NodeClientModule.configure(
NodeClientModule.java:38)
No implementation for java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at org.elasticsearch.client.node.
NodeIndicesAdminClient.(Unknown Source)
at org.elasticsearch.client.node.NodeClientModule.configure(
NodeClientModule.java:36)
No implementation for java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at org.elasticsearch.client.node.
NodeIndicesAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeIndicesAdminClient
for parameter 2 at org.elasticsearch.client.node.NodeAdminClient.(Unknown
Source)
at org.elasticsearch.client.node.NodeClientModule.configure(
NodeClientModule.java:37)
No implementation for java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction> was bound.
while locating java.util.Map<org.elasticsearch.action.GenericAction,
org.elasticsearch.action.support.TransportAction>
for parameter 1 at org.elasticsearch.client.node.
NodeIndicesAdminClient.(Unknown Source)
while locating org.elasticsearch.client.node.NodeIndicesAdminClient
for parameter 2 at org.elasticsearch.client.node.NodeAdminClient.(Unknown
Source)
while locating org.elasticsearch.client.node.NodeAdminClient
for parameter 2 at org.elasticsearch.client.node.NodeClient.(Unknown
Source)
at org.elasticsearch.client.node.NodeClientModule.configure(
NodeClientModule.java:38)
No implementation for org.elasticsearch.action.GenericAction
annotated with @org.elasticsearch.common.inject.multibindings.Element(
setNam
e=,uniqueId=275) was bound.
at org.elasticsearch.action.ActionModule.configure(
ActionModule.java:304)
An exception was caught and reported. Message: null
at org.elasticsearch.common.inject.InjectorShell$Builder.
build(InjectorShell.java:130)
9 errors
at org.elasticsearch.common.inject.internal.Errors.
throwCreationExceptionIfErrorsExist(Errors.java:344)
at org.elasticsearch.common.inject.InjectorBuilder.
initializeStatically(InjectorBuilder.java:151)
at org.elasticsearch.common.inject.InjectorBuilder.build(
InjectorBuilder.java:102)
at org.elasticsearch.common.inject.Guice.createInjector(
Guice.java:93)
at org.elasticsearch.common.inject.Guice.createInjector(
Guice.java:70)
at org.elasticsearch.common.inject.ModulesBuilder.
createInjector(ModulesBuilder.java:59)
at org.elasticsearch.node.internal.InternalNode.(
InternalNode.java:192)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.
java:159)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.
java:70)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:
203)
at org.elasticsearch.bootstrap.Elasticsearch.main(
Elasticsearch.java:32)
Caused by: java.lang.reflect.MalformedParameterizedTypeException
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.
validateConstructorArguments(ParameterizedTypeImpl.java:58)
at sun.reflect.generics.reflectiveObjects.
ParameterizedTypeImpl.(ParameterizedTypeImpl.java:51)
at sun.reflect.generics.reflectiveObjects.
ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:92)
at sun.reflect.generics.factory.CoreReflectionFactory.
makeParameterizedType(CoreReflectionFactory.java:105)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(
Reifier.java:140)
at sun.reflect.generics.tree.ClassTypeSignature.accept(
ClassTypeSignature.java:49)
at sun.reflect.generics.repository.ClassRepository.
getSuperclass(ClassRepository.java:86)
at java.lang.Class.getGenericSuperclass(Class.java:764)
at org.elasticsearch.common.inject.internal.MoreTypes.
getGenericSupertype(MoreTypes.java:390)
at org.elasticsearch.common.inject.TypeLiteral.
getSupertype(TypeLiteral.java:262)
at org.elasticsearch.common.inject.spi.InjectionPoint.
addInjectionPoints(InjectionPoint.java:341)
at org.elasticsearch.common.inject.spi.InjectionPoint.
forInstanceMethodsAndFields(InjectionPoint.java:287)
at org.elasticsearch.common.inject.spi.InjectionPoint.
forInstanceMethodsAndFields(InjectionPoint.java:309)
at org.elasticsearch.common.inject.internal.
BindingBuilder.toInstance(BindingBuilder.java:78)
at org.elasticsearch.action.ActionModule.configure(
ActionModule.java:304)
at org.elasticsearch.common.inject.AbstractModule.
configure(AbstractModule.java:60)
at org.elasticsearch.common.inject.spi.Elements$
RecordingBinder.install(Elements.java:204)
at org.elasticsearch.common.inject.spi.Elements.
getElements(Elements.java:85)
at org.elasticsearch.common.inject.InjectorShell$Builder.
build(InjectorShell.java:130)
at org.elasticsearch.common.inject.InjectorBuilder.build(
InjectorBuilder.java:99)
... 8 more
Thanks,
Sandeep
On Thursday, 5 June 2014 02:15:37 UTC+5:30, Jörg Prante wrote:
Absolutely, agreed.
The docs are sparse in my simple plugin too. I try to find some time to
add sample code for all the variants and explain the differences.
Jörg
On Wed, Jun 4, 2014 at 6:22 PM, Ivan Brusic iv...@brusic.com wrote:
Jörg, thanks for the plugin to help as a starting point for plugin
development.
Although I have built a few plugins during the years, they were river
or analysis plugins, which are fairly easy. Writing a custom action
required a lot more digging, especially since there are very few to learn
from. I still would like to see a write-up regarding the different families
of transport actions: BroadcastOperationRequest,
MasterNodeOperationRequest, NodesOperationRequest, Sin
gleShardOperationRequest, SingleCustomOperationRequest, etc. What is
the difference? I understand it now, but it should be documented. There is
little documentation about the internals and there are no code level
comments. I always meant to experiment with the different
action hierarchies via simple plugins and document my findings. Perhaps one
day...
You need resources on all nodes that hold shards, you can not do it
with just one instance, because ES index is distributed. Rescoring would be
very expensive if you did it on an extra central instance with an extra
scatter/gather phase. It is also very expensive in scripting.
The problem is that only one copy of HashMap is needed to customize
score of
all documents in the cluster. But as we have to install the plugin
on all
nodes, the actual memory used is multiplied by the number of nodes
in
cluster. I try to figure out one way to save the memory. Tried on
non-data
node, but it seems not working.
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.