[ANN] Elasticsearch Simple Action Plugin

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.

Two tutorials:

Cheers,

Ivan

On Fri, Jun 6, 2014 at 9:33 AM, virgil virgilxie@gmail.com wrote:

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.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057232.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1402072380650-4057232.post%40n3.nabble.com
.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQAvHOhOokAKVd2creOCJ%3DGxFROqUznkChbBT4SOsWDghg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

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

Jörg

On Fri, Jun 6, 2014 at 6:33 PM, virgil virgilxie@gmail.com wrote:

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.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057232.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1402072380650-4057232.post%40n3.nabble.com
.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHRK2rUjGKTCxyLQNkKY4Fcc6Dxo0Hz-YkswXZ3SvNELw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

For an example function score plugin implementation, see

https://github.com/elasticsearch/elasticsearch/blob/master/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginTests.java

Jörg

On Fri, Jun 6, 2014 at 7:10 PM, joergprante@gmail.com <joergprante@gmail.com

wrote:

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

Jörg

On Fri, Jun 6, 2014 at 6:33 PM, virgil virgilxie@gmail.com wrote:

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.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057232.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1402072380650-4057232.post%40n3.nabble.com
.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGgcF50wo6n227MjH84cVYxGPFc-pVAAkDQtioxZ08AiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

I will give it a try and let you know what happens. Really appreciate your help.

Thank you for the links!

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.

Jörg

On Fri, Jun 6, 2014 at 7:24 PM, virgil virgilxie@gmail.com wrote:

I will give it a try and let you know what happens. Really appreciate your
help.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057244.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1402075491599-4057244.post%40n3.nabble.com
.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEhiWYbN2dffYkbYnY%2BvrLc-BNo5H%3D2QMjhFYuwamBvPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

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,

  1. 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)

  2. 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)

  3. 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)

  4. 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)

  5. 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)

  6. 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...

Cheers,

Ivan

On Wed, Jun 4, 2014 at 1:09 AM, joerg...@gmail.com <javascript:> <
joerg...@gmail.com <javascript:>> wrote:

Sorry, the plugin is outdated, a better start is by looking at

Elasticsearch Platform — Find real-time answers at scale | Elastic

Jörg

On Wed, Jun 4, 2014 at 10:07 AM, joerg...@gmail.com <javascript:> <
joerg...@gmail.com <javascript:>> wrote:

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.

A better method is a similarity plugin like
GitHub - tlrx/elasticsearch-custom-similarity-provider: A custom SimilarityProvider example for Elasticsearch

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.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057015.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1401843345821-4057015.post%40n3.nabble.com
.
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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 elasticsearch@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,

  1. 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)

  2. 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)

  3. 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)

  4. 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)

  5. 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)

  6. 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...

Cheers,

Ivan

On Wed, Jun 4, 2014 at 1:09 AM, joerg...@gmail.com joerg...@gmail.com
wrote:

Sorry, the plugin is outdated, a better start is by looking at

Elasticsearch Platform — Find real-time answers at scale | Elastic
reference/current/index-modules-similarity.html

Jörg

On Wed, Jun 4, 2014 at 10:07 AM, joerg...@gmail.com <joerg...@gmail.com

wrote:

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.

A better method is a similarity plugin like tlrx (Tanguy Leroux) · GitHub
elasticsearch-custom-similarity-provider

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 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.

--
View this message in context: http://elasticsearch-users.
115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-
Plugin-tp4056971p4057015.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/1401843345821-4057015.post%40n3.nabble.com.
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%
3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%
2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFkB%3DuB5r%2Bcfu_JMEO9mRmYFYtzqucU18HcV_zuhZ%3DaDw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi Jorg,

Sure. Thanks,

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,

  1. 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)

  2. 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)

  3. 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)

  4. 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)

  5. 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)

  6. 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...

Cheers,

Ivan

On Wed, Jun 4, 2014 at 1:09 AM, joerg...@gmail.com joerg...@gmail.com
wrote:

Sorry, the plugin is outdated, a better start is by looking at

Elasticsearch Platform — Find real-time answers at scale | Elastic
reference/current/index-modules-similarity.html

Jörg

On Wed, Jun 4, 2014 at 10:07 AM, joerg...@gmail.com <
joerg...@gmail.com> wrote:

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.

A better method is a similarity plugin like tlrx (Tanguy Leroux) · GitHub
elasticsearch-custom-similarity-provider

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 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.

--
View this message in context: http://elasticsearch-users.
115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-
Plugin-tp4056971p4057015.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/
1401843345821-4057015.post%40n3.nabble.com.
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%
3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%
2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8fe345ab-4488-47cd-8c0a-8b5454d3bc62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

It was a quick fix. new version is checked in.

Thanks for reminding,

Jörg

On Thu, Sep 11, 2014 at 7:53 PM, 'Sandeep Ramesh Khanzode' via
elasticsearch elasticsearch@googlegroups.com wrote:

Hi Jorg,

Sure. Thanks,

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,

  1. 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)

  2. 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)

  3. 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)

  4. 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)

  5. 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)

  6. 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...

Cheers,

Ivan

On Wed, Jun 4, 2014 at 1:09 AM, joerg...@gmail.com <joerg...@gmail.com

wrote:

Sorry, the plugin is outdated, a better start is by looking at

Elasticsearch Platform — Find real-time answers at scale | Elastic
e/current/index-modules-similarity.html

Jörg

On Wed, Jun 4, 2014 at 10:07 AM, joerg...@gmail.com <
joerg...@gmail.com> wrote:

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.

A better method is a similarity plugin like tlrx (Tanguy Leroux) · GitHub
elasticsearch-custom-similarity-provider

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 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.

--
View this message in context: http://elasticsearch-users.115
913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-
tp4056971p4057015.html
Sent from the Elasticsearch Users mailing list archive at
Nabble.com.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/140184334582
1-4057015.post%40n3.nabble.com.
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZ
rAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%
3D0EyAKf3VGhjYdQ%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%
40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8fe345ab-4488-47cd-8c0a-8b5454d3bc62%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/8fe345ab-4488-47cd-8c0a-8b5454d3bc62%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEQZzq3kvSOMt5tfH_fCFb9OfRj9ZJZsh77KBLEM1eMyw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.