[ANN] Elasticsearch Simple Action Plugin

classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Elasticsearch Simple Action Plugin

Ivan Brusic
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 <[hidden email]> 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 [hidden email].
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Elasticsearch Simple Action Plugin

joergprante@gmail.com
In reply to this post by virgil
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 <[hidden email]> 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 [hidden email].
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Elasticsearch Simple Action Plugin

joergprante@gmail.com


On Fri, Jun 6, 2014 at 7:10 PM, [hidden email] <[hidden email]> 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 <[hidden email]> 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 [hidden email].
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Elasticsearch Simple Action Plugin

virgil
I will give it a try and let you know what happens. Really appreciate your help.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Elasticsearch Simple Action Plugin

virgil
In reply to this post by Ivan Brusic
Thank you for the links!
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Elasticsearch Simple Action Plugin

joergprante@gmail.com
In reply to this post by virgil
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 <[hidden email]> 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 [hidden email].
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Elasticsearch Simple Action Plugin

ElasticSearch Users mailing list
In reply to this post by joergprante@gmail.com
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,

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.NodeClusterAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeClusterAdminClient
    for parameter 1 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)

5) 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.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:36)

6) 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.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeIndicesAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:37)

7) 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.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeIndicesAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)

8) 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)

9) 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.<init>(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.<init>(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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="qYR0bUuTvykJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">iv...@...> 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, <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qYR0bUuTvykJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">joerg...@... <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="qYR0bUuTvykJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">joerg...@...> wrote:
Sorry, the plugin is outdated, a better start is by looking at

<a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-similarity.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Findex-modules-similarity.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFFFIEyaerQeBqLTRm4q3DOv6wc8A';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Findex-modules-similarity.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFFFIEyaerQeBqLTRm4q3DOv6wc8A';return true;">http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-similarity.html

Jörg


On Wed, Jun 4, 2014 at 10:07 AM, <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qYR0bUuTvykJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">joerg...@... <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="qYR0bUuTvykJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">joerg...@...> 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 <a href="https://github.com/tlrx/elasticsearch-custom-similarity-provider" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Ftlrx%2Felasticsearch-custom-similarity-provider\46sa\75D\46sntz\0751\46usg\75AFQjCNH-w_LxQXsQM7hV3UeTiZC1qbJ1Eg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Ftlrx%2Felasticsearch-custom-similarity-provider\46sa\75D\46sntz\0751\46usg\75AFQjCNH-w_LxQXsQM7hV3UeTiZC1qbJ1Eg';return true;">https://github.com/tlrx/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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="qYR0bUuTvykJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">virg...@...> 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: <a href="http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057015.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Felasticsearch-users.115913.n3.nabble.com%2FANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057015.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHlxJntrRQgmFk0DF5YlISGpPEVZQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Felasticsearch-users.115913.n3.nabble.com%2FANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057015.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHlxJntrRQgmFk0DF5YlISGpPEVZQ';return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qYR0bUuTvykJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/elasticsearch/1401843345821-4057015.post%40n3.nabble.com" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/1401843345821-4057015.post%40n3.nabble.com';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/1401843345821-4057015.post%40n3.nabble.com';return true;">https://groups.google.com/d/msgid/elasticsearch/1401843345821-4057015.post%40n3.nabble.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qYR0bUuTvykJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qYR0bUuTvykJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Elasticsearch Simple Action Plugin

joergprante@gmail.com
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 <[hidden email]> 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,

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.NodeClusterAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeClusterAdminClient
    for parameter 1 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)

5) 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.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:36)

6) 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.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeIndicesAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:37)

7) 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.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeIndicesAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)

8) 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)

9) 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.<init>(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.<init>(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 <[hidden email]> 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, [hidden email] <[hidden email]> wrote:
Sorry, the plugin is outdated, a better start is by looking at


Jörg


On Wed, Jun 4, 2014 at 10:07 AM, [hidden email] <[hidden email]> 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 https://github.com/tlrx/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 <[hidden email]> 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.

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.

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 [hidden email].
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.

--
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Elasticsearch Simple Action Plugin

ElasticSearch Users mailing list
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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="ohM6NDqDcwYJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">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,

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.NodeClusterAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeClusterAdminClient
    for parameter 1 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)

5) 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.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:36)

6) 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.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeIndicesAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:37)

7) 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.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeIndicesAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)

8) 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)

9) 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.<init>(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.<init>(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 <[hidden email]> 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, [hidden email] <[hidden email]> wrote:
Sorry, the plugin is outdated, a better start is by looking at

<a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-similarity.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Findex-modules-similarity.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFFFIEyaerQeBqLTRm4q3DOv6wc8A';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Findex-modules-similarity.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFFFIEyaerQeBqLTRm4q3DOv6wc8A';return true;">http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-similarity.html

Jörg


On Wed, Jun 4, 2014 at 10:07 AM, [hidden email] <[hidden email]> 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 <a href="https://github.com/tlrx/elasticsearch-custom-similarity-provider" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Ftlrx%2Felasticsearch-custom-similarity-provider\46sa\75D\46sntz\0751\46usg\75AFQjCNH-w_LxQXsQM7hV3UeTiZC1qbJ1Eg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Ftlrx%2Felasticsearch-custom-similarity-provider\46sa\75D\46sntz\0751\46usg\75AFQjCNH-w_LxQXsQM7hV3UeTiZC1qbJ1Eg';return true;">https://github.com/tlrx/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 <[hidden email]> 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: <a href="http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057015.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Felasticsearch-users.115913.n3.nabble.com%2FANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057015.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHlxJntrRQgmFk0DF5YlISGpPEVZQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Felasticsearch-users.115913.n3.nabble.com%2FANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057015.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHlxJntrRQgmFk0DF5YlISGpPEVZQ';return true;">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 <a href="https://groups.google.com/d/msgid/elasticsearch/1401843345821-4057015.post%40n3.nabble.com" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/1401843345821-4057015.post%40n3.nabble.com';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/1401843345821-4057015.post%40n3.nabble.com';return true;">https://groups.google.com/d/msgid/elasticsearch/1401843345821-4057015.post%40n3.nabble.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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 <a href="https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHZTAZrAdtQAnvj_7UtO%3DaAVtN3qt337PTzDjnbCmtPaA%40mail.gmail.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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 <a href="https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="ohM6NDqDcwYJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/msgid/elasticsearch/3d3018dc-38a3-4a6a-857b-2162a6d3d8a9%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Elasticsearch Simple Action Plugin

joergprante@gmail.com
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 <[hidden email]> 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,

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.NodeClusterAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeClusterAdminClient
    for parameter 1 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)

5) 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.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:36)

6) 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.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeIndicesAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:37)

7) 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.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeIndicesAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeAdminClient.<init>(Unknown Source)
  while locating org.elasticsearch.client.node.NodeAdminClient
    for parameter 2 at org.elasticsearch.client.node.NodeClient.<init>(Unknown Source)
  at org.elasticsearch.client.node.NodeClientModule.configure(NodeClientModule.java:38)

8) 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)

9) 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.<init>(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.<init>(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 <[hidden email]> 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, [hidden email] <[hidden email]> wrote:
Sorry, the plugin is outdated, a better start is by looking at


Jörg


On Wed, Jun 4, 2014 at 10:07 AM, [hidden email] <[hidden email]> 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 https://github.com/tlrx/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 <[hidden email]> 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.

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.

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.

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 [hidden email].
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.

--
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 [hidden email].
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.
12