Re: [ANN] Elasticsearch Simple Action Plugin
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, 4) No implementation for java.util.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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)
Re: [ANN] Elasticsearch Simple Action Plugin
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, 4) No implementation for java.util.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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
Re: [ANN] Elasticsearch Simple Action Plugin
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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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)
Re: [ANN] Elasticsearch Simple Action Plugin
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, 4) No implementation for java.util.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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.Maporg.elasticsearch.action.GenericAction, org.elasticsearch.action.support.TransportAction was bound. while locating java.util.Maporg.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
Re: [ANN] Elasticsearch Simple Action Plugin
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. https://github.com/jprante/elasticsearch-functionscore-conditionalboost Jörg On Fri, Jun 6, 2014 at 7:24 PM, virgil virgil...@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+unsubscr...@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+unsubscr...@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.
Re: [ANN] Elasticsearch Simple Action Plugin
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+unsubscr...@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.
Re: [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: http://www.spacevatican.org/2012/5/12/elasticsearch-native-scripts-for-dummies/ https://github.com/imotov/elasticsearch-native-script-example Cheers, Ivan On Fri, Jun 6, 2014 at 9:33 AM, virgil virgil...@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+unsubscr...@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+unsubscr...@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.
Re: [ANN] Elasticsearch Simple Action Plugin
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 virgil...@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+unsubscr...@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+unsubscr...@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.
Re: [ANN] Elasticsearch Simple Action Plugin
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, joergpra...@gmail.com joergpra...@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 virgil...@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+unsubscr...@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+unsubscr...@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.
Re: [ANN] Elasticsearch Simple Action Plugin
Thank you for the links! -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057245.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1402075639288-4057245.post%40n3.nabble.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
/CAKdsXoGBMEEc6oC1%3DBX7gS41se13BExO_iKJtiGC6zrhmxJqxA%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- If you reply to this email, your message will be added to the discussion below: http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057071.html To unsubscribe from [ANN] Elasticsearch Simple Action Plugin, click here . NAML http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- Fei (Virgil) Xie M.S. in Very Large Information System, Institue for Software Research School of Computer Science, Carnegie Mellon University [hidden email] http://user/SendEmail.jtp?type=nodenode=4057083i=2 Alumni, Tsinghua University -- View this message in context: Re: [ANN] Elasticsearch Simple Action Plugin http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057083.html Sent from the ElasticSearch Users mailing list archive http://elasticsearch-users.115913.n3.nabble.com/ 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAPRQSRfZTu0vFYOn0gbFnAUuaWQgB16vGGZspatGrL-ACt8jtA%40mail.gmail.com https://groups.google.com/d/msgid/elasticsearch/CAPRQSRfZTu0vFYOn0gbFnAUuaWQgB16vGGZspatGrL-ACt8jtA%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFPsWWBqM2EH86ZCW_uyoFespTnfGgTdVgRVvH5612GTg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
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 virgil...@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 elasticsearch+unsubscr...@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 elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH%3D228Y2PvB265Hs4NX1O_Ac4QBuWXJGcCqKaXFc3a56A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
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, joergpra...@gmail.com joergpra...@gmail.com wrote: Sorry, the plugin is outdated, a better start is by looking at http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-similarity.html Jörg On Wed, Jun 4, 2014 at 10:07 AM, joergpra...@gmail.com joergpra...@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 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 virgil...@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 elasticsearch+unsubscr...@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 elasticsearch+unsubscr...@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=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
Yeah, but I would consider the nondata node is already doing the job. -- These non data nodes are still part of the cluster, and they redirect operations exactly to the node that holds the relevant data. The other benefit is the fact that for scatter / gather based operations (such as search), these nodes will take part of the processing since they will start the scatter process, and perform the actual gather processing. I just uploaded my native script code in https://github.com/virgil0/TestPlugin. It works with the function score query. You can see that there are 3 bin file I need to load into memory. Thank you for reply. -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057054.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1401905723480-4057054.post%40n3.nabble.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
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 i...@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, joergpra...@gmail.com joergpra...@gmail.com wrote: Sorry, the plugin is outdated, a better start is by looking at http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-similarity.html Jörg On Wed, Jun 4, 2014 at 10:07 AM, joergpra...@gmail.com joergpra...@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 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 virgil...@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 elasticsearch+unsubscr...@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 elasticsearch+unsubscr...@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=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCkOVMuEV67ZMCX5qoAdiob%2BfWsuWK%3D0EyAKf3VGhjYdQ%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGRDpkJcvWzYp1TH19j%3DWhe5XULn7eRDiPTXMPa1HR1NQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
You should have released this before my talk last week, I could have mentioned it :\ https://www.youtube.com/watch?v=FbAO2k57bdg -- Itamar Syn-Hershko http://code972.com | @synhershko https://twitter.com/synhershko Freelance Developer Consultant Author of RavenDB in Action http://manning.com/synhershko/ On Tue, Jun 3, 2014 at 6:15 PM, joergpra...@gmail.com joergpra...@gmail.com wrote: Hi, many of us want to start writing extensions for Elasticsearch. Except submitting pull requests to the core code, one great advantage of Elasticsearch is the plugin mechanism. Here, custom code can be hooked into Elasticsearch, without having to ask for inclusion into the core code. Nevertheless, plugin code can be published on Github and easily included into a running ES instance by using the ES plugin command line tool. Unfortunately, writing plugins is not so easy as it seems. There are many plugins, some of them are very advanced, and finding a starting point for a personal project could be quite hard. Hence, for educational purposes, I wrote a tiny plugin, as a starting point, to demonstrate how a plugin works. The simple plugin is indeed very simple. It makes reuse of the standard search action: - it defines a built-in query (a match all query) - it creates a custom action for it - the action is called from Java API - the result of the action (the search response of the match all query) is logged The plugin code comes with a junit test. It is available at https://github.com/jprante/elasticsearch-simple-action-plugin In the hope it is useful, Jörg -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH-M6%2BZroAz8Reb3e2agW0vXKSavk%3D0hD_bq%2BBHtRYLhw%40mail.gmail.com https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH-M6%2BZroAz8Reb3e2agW0vXKSavk%3D0hD_bq%2BBHtRYLhw%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zt-16RTbRh376Kxg%3Di7DmjRhav-PYk_7qs1J5wu1W5a8w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
Don't forget your slides. :) http://code972.com/blog/2014/05/72-the-ultimate-guide-for-elasticsearch-plugins-video-slides On Wed, Jun 4, 2014 at 2:30 PM, Itamar Syn-Hershko ita...@code972.com wrote: You should have released this before my talk last week, I could have mentioned it :\ https://www.youtube.com/watch?v=FbAO2k57bdg -- Itamar Syn-Hershko http://code972.com | @synhershko https://twitter.com/synhershko Freelance Developer Consultant Author of RavenDB in Action http://manning.com/synhershko/ On Tue, Jun 3, 2014 at 6:15 PM, joergpra...@gmail.com joergpra...@gmail.com wrote: Hi, many of us want to start writing extensions for Elasticsearch. Except submitting pull requests to the core code, one great advantage of Elasticsearch is the plugin mechanism. Here, custom code can be hooked into Elasticsearch, without having to ask for inclusion into the core code. Nevertheless, plugin code can be published on Github and easily included into a running ES instance by using the ES plugin command line tool. Unfortunately, writing plugins is not so easy as it seems. There are many plugins, some of them are very advanced, and finding a starting point for a personal project could be quite hard. Hence, for educational purposes, I wrote a tiny plugin, as a starting point, to demonstrate how a plugin works. The simple plugin is indeed very simple. It makes reuse of the standard search action: - it defines a built-in query (a match all query) - it creates a custom action for it - the action is called from Java API - the result of the action (the search response of the match all query) is logged The plugin code comes with a junit test. It is available at https://github.com/jprante/elasticsearch-simple-action-plugin In the hope it is useful, Jörg -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH-M6%2BZroAz8Reb3e2agW0vXKSavk%3D0hD_bq%2BBHtRYLhw%40mail.gmail.com https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH-M6%2BZroAz8Reb3e2agW0vXKSavk%3D0hD_bq%2BBHtRYLhw%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zt-16RTbRh376Kxg%3Di7DmjRhav-PYk_7qs1J5wu1W5a8w%40mail.gmail.com https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zt-16RTbRh376Kxg%3Di7DmjRhav-PYk_7qs1J5wu1W5a8w%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQD0Pvbr0eenPiVYm032ZycyTGWKxL7MH3KNL5EBAJZCzg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
As said, it is true that scoring scripts (like the function score scripts o the AbstractSearchScript) need to reside on data nodes. Accessing fields is a low level operation in a script so it is not possible to install such a boost plugin that uses scripting on a data-less node. You would have to install it on all the data nodes which might become tedious (but it is doable). Another issue is that you use scripting in a java plugin. I conclude from this, the search should work later over the HTTP API by executing a standard function score query with the boost script name (is that true?) Writing a plugin, in a pure java environment, you have much more degrees of freedom to supersede the script functionality and use other code paths. For example, you could reuse the resource watch service from ES (used for watching script file changes) to reload the boost info (which is in your binary files I assume). Then you could build the query internally using the Java API as a custom score query action and execute it from your favorite (data-less) node (or from two nodes, for better fault tolerance / load balancing). Optionally, you could expose a new endpoint to the ES REST API, for example _search_with_boost, which works like _search, but makes use of the boost info files. For a more generic solution, it would be convenient to convert the boost info into a JSON parameter file so this could be loaded by the standard ES settings/config routines and by other languages, also for better reuse by others in the ES community :) An example plugin name could be boost control plugin... Jörg On Wed, Jun 4, 2014 at 8:15 PM, virgil virgil...@gmail.com wrote: Yeah, but I would consider the nondata node is already doing the job. -- These non data nodes are still part of the cluster, and they redirect operations exactly to the node that holds the relevant data. The other benefit is the fact that for scatter / gather based operations (such as search), these nodes will take part of the processing since they will start the scatter process, and perform the actual gather processing. I just uploaded my native script code in https://github.com/virgil0/TestPlugin. It works with the function score query. You can see that there are 3 bin file I need to load into memory. Thank you for reply. -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057054.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1401905723480-4057054.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGBMEEc6oC1%3DBX7gS41se13BExO_iKJtiGC6zrhmxJqxA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
Great walkthrough :) ... I only miss the mentioning of the standard language plugins for scripting (groovy, js, etc.) And rivers are not obsolete, the pull method from a singleton river node is just discouraged. Jörg On Wed, Jun 4, 2014 at 11:30 PM, Itamar Syn-Hershko ita...@code972.com wrote: You should have released this before my talk last week, I could have mentioned it :\ https://www.youtube.com/watch?v=FbAO2k57bdg -- Itamar Syn-Hershko http://code972.com | @synhershko https://twitter.com/synhershko Freelance Developer Consultant Author of RavenDB in Action http://manning.com/synhershko/ On Tue, Jun 3, 2014 at 6:15 PM, joergpra...@gmail.com joergpra...@gmail.com wrote: Hi, many of us want to start writing extensions for Elasticsearch. Except submitting pull requests to the core code, one great advantage of Elasticsearch is the plugin mechanism. Here, custom code can be hooked into Elasticsearch, without having to ask for inclusion into the core code. Nevertheless, plugin code can be published on Github and easily included into a running ES instance by using the ES plugin command line tool. Unfortunately, writing plugins is not so easy as it seems. There are many plugins, some of them are very advanced, and finding a starting point for a personal project could be quite hard. Hence, for educational purposes, I wrote a tiny plugin, as a starting point, to demonstrate how a plugin works. The simple plugin is indeed very simple. It makes reuse of the standard search action: - it defines a built-in query (a match all query) - it creates a custom action for it - the action is called from Java API - the result of the action (the search response of the match all query) is logged The plugin code comes with a junit test. It is available at https://github.com/jprante/elasticsearch-simple-action-plugin In the hope it is useful, Jörg -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH-M6%2BZroAz8Reb3e2agW0vXKSavk%3D0hD_bq%2BBHtRYLhw%40mail.gmail.com https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH-M6%2BZroAz8Reb3e2agW0vXKSavk%3D0hD_bq%2BBHtRYLhw%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zt-16RTbRh376Kxg%3Di7DmjRhav-PYk_7qs1J5wu1W5a8w%40mail.gmail.com https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zt-16RTbRh376Kxg%3Di7DmjRhav-PYk_7qs1J5wu1W5a8w%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEyF-hh3yEfeznk6p8v1tuzreDTYgcUVohuRW%3DpXRyO2w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
Really good suggestion! Yeah, the search will work by executing a standard function score query with the boost script name. Thank you! 2014-06-04 15:06 GMT-07:00 joergpra...@gmail.com [via ElasticSearch Users] ml-node+s115913n4057071...@n3.nabble.com: As said, it is true that scoring scripts (like the function score scripts o the AbstractSearchScript) need to reside on data nodes. Accessing fields is a low level operation in a script so it is not possible to install such a boost plugin that uses scripting on a data-less node. You would have to install it on all the data nodes which might become tedious (but it is doable). Another issue is that you use scripting in a java plugin. I conclude from this, the search should work later over the HTTP API by executing a standard function score query with the boost script name (is that true?) Writing a plugin, in a pure java environment, you have much more degrees of freedom to supersede the script functionality and use other code paths. For example, you could reuse the resource watch service from ES (used for watching script file changes) to reload the boost info (which is in your binary files I assume). Then you could build the query internally using the Java API as a custom score query action and execute it from your favorite (data-less) node (or from two nodes, for better fault tolerance / load balancing). Optionally, you could expose a new endpoint to the ES REST API, for example _search_with_boost, which works like _search, but makes use of the boost info files. For a more generic solution, it would be convenient to convert the boost info into a JSON parameter file so this could be loaded by the standard ES settings/config routines and by other languages, also for better reuse by others in the ES community :) An example plugin name could be boost control plugin... Jörg On Wed, Jun 4, 2014 at 8:15 PM, virgil [hidden email] http://user/SendEmail.jtp?type=nodenode=4057071i=0 wrote: Yeah, but I would consider the nondata node is already doing the job. -- These non data nodes are still part of the cluster, and they redirect operations exactly to the node that holds the relevant data. The other benefit is the fact that for scatter / gather based operations (such as search), these nodes will take part of the processing since they will start the scatter process, and perform the actual gather processing. I just uploaded my native script code in https://github.com/virgil0/TestPlugin. It works with the function score query. You can see that there are 3 bin file I need to load into memory. Thank you for reply. -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057054.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] http://user/SendEmail.jtp?type=nodenode=4057071i=1. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1401905723480-4057054.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] http://user/SendEmail.jtp?type=nodenode=4057071i=2. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGBMEEc6oC1%3DBX7gS41se13BExO_iKJtiGC6zrhmxJqxA%40mail.gmail.com https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGBMEEc6oC1%3DBX7gS41se13BExO_iKJtiGC6zrhmxJqxA%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- If you reply to this email, your message will be added to the discussion below: http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057071.html To unsubscribe from [ANN] Elasticsearch Simple Action Plugin, click here http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4056971code=dmlyZ2lseGllQGdtYWlsLmNvbXw0MDU2OTcxfC0xNjE2Mzk5OA== . NAML http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- Fei (Virgil) Xie M.S. in Very Large Information System, Institue for Software Research School of Computer Science, Carnegie Mellon University f...@andrew.cmu.edu
Re: [ANN] Elasticsearch Simple Action Plugin
Hi Jörg, Thanks a lot! Some month ago I started to write one plugin and it was really difficult. This skeleton is perfect for a cold start :) On Tue, Jun 3, 2014 at 12:15 PM, joergpra...@gmail.com joergpra...@gmail.com wrote: Hi, many of us want to start writing extensions for Elasticsearch. Except submitting pull requests to the core code, one great advantage of Elasticsearch is the plugin mechanism. Here, custom code can be hooked into Elasticsearch, without having to ask for inclusion into the core code. Nevertheless, plugin code can be published on Github and easily included into a running ES instance by using the ES plugin command line tool. Unfortunately, writing plugins is not so easy as it seems. There are many plugins, some of them are very advanced, and finding a starting point for a personal project could be quite hard. Hence, for educational purposes, I wrote a tiny plugin, as a starting point, to demonstrate how a plugin works. The simple plugin is indeed very simple. It makes reuse of the standard search action: - it defines a built-in query (a match all query) - it creates a custom action for it - the action is called from Java API - the result of the action (the search response of the match all query) is logged The plugin code comes with a junit test. It is available at https://github.com/jprante/elasticsearch-simple-action-plugin In the hope it is useful, Jörg -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH-M6%2BZroAz8Reb3e2agW0vXKSavk%3D0hD_bq%2BBHtRYLhw%40mail.gmail.com https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH-M6%2BZroAz8Reb3e2agW0vXKSavk%3D0hD_bq%2BBHtRYLhw%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Luiz Guilherme P. Santos -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZEcM%3DzRmLk9%2BK7fiZ1hoT1zbcy_ScYT0F_8Kx0RzPkm%2BA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
Thank you. About the plugin, I wonder if you install it on all nodes in cluster to make it work or install it in a nondata node? -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4056981.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1401816815837-4056981.post%40n3.nabble.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
Usually, plugins that extend internal ES functionality should be installed on all nodes. This is easy to remember and preferable from an administrative view. All the nodes in the ES cluster must have access to plugin code under all circumstances, especially when executing actions, mappers, routers, discovery helpers, analyzer code, indexing helpers... In this case, for the simple action demo plugin, you can install it just on the node of the cluster where you want to execute the demo match_all search from. The match_all search is then searching on all the indexes of the cluster. If you want to execute the demo plugin match_all search from other nodes, you would have to install the plugin on those other nodes, too. Jörg On Tue, Jun 3, 2014 at 7:33 PM, virgil virgil...@gmail.com wrote: Thank you. About the plugin, I wonder if you install it on all nodes in cluster to make it work or install it in a nondata node? -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4056981.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1401816815837-4056981.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFkQ4xL5xqrXfH%2BzwSJ0WvyLcNw6S%2B7Z0pTSCuwXHnXWw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
Thank you Jörg. I see the point. But if the plugin consumes memory (ex. hold a HashMap for customized score), installing it on all nodes may waste memory of the cluster. Is there any way to deal with this issue? -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057003.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1401832124609-4057003.post%40n3.nabble.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
Not sure if I understand your concern completely - as long as you're doing things right in your code, it should be possible to allocate resources only when required - this holds also for plugins. Jörg On Tue, Jun 3, 2014 at 11:48 PM, virgil virgil...@gmail.com wrote: Thank you Jörg. I see the point. But if the plugin consumes memory (ex. hold a HashMap for customized score), installing it on all nodes may waste memory of the cluster. Is there any way to deal with this issue? -- View this message in context: http://elasticsearch-users.115913.n3.nabble.com/ANN-Elasticsearch-Simple-Action-Plugin-tp4056971p4057003.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1401832124609-4057003.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFpp8ybSWqxya9s-hK6qhhBUOTno8pdgX-Ba6YT_oAHFA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] Elasticsearch Simple Action Plugin
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 elasticsearch+unsubscr...@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.