error using facet script plugin for Java API

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

error using facet script plugin for Java API

kajal
I am trying to use facet-script plugin, it works fine through elastic search head.
But when i try to do the same thing with java api using transport elastic search client it throws below null pointer exception.
FYI: I am using elastic search 90.0 version and facet-script plugin 1.1.0 version.

WARN  [2013-07-31 20:24:45,980] org.elasticsearch.transport.netty: [Phoenix] Message not fully read (response) for [50] handler org.elasticsearch.action.TransportActionNodeProxy$1@8a590d1, error [false], resetting
ERROR [2013-07-31 20:24:45,980] STDERR: org.elasticsearch.transport.TransportSerializationException: Failed to deserialize response of type [org.elasticsearch.action.search.SearchResponse]
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:150)
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:127)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:150)
        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:127)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)ERROR [2013-07-31 20:24:45,981] STDERR:        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)ERROR [2013-07-31 20:24:45,981] STDERR:   at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)

        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)ERROR [2013-07-31 20:24:45,981] STDERR:        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)

        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)ERROR [2013-07-31 20:24:45,981] STDERR:   at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)

        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)ERROR [2013-07-31 20:24:45,981] STDERR:       at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)

        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)

ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
Caused by: java.lang.NullPointerException
        at org.elasticsearch.search.facet.InternalFacets.readFrom(InternalFacets.java:144)ERROR [2013-07-31 20:24:45,981] STDERR:       at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)

        at org.elasticsearch.search.facet.InternalFacets.readFacets(InternalFacets.java:130)
        at org.elasticsearch.search.internal.InternalSearchResponse.readFrom(InternalSearchResponse.java:99)ERROR [2013-07-31 20:24:45,981] STDERR:     at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)

        at org.elasticsearch.search.internal.InternalSearchResponse.readInternalSearchResponse(InternalSearchResponse.java:91)
        at org.elasticsearch.action.search.SearchResponse.readFrom(SearchResponse.java:219)
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:148)ERROR [2013-07-31 20:24:45,982] STDERR:        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)



Here is the code sample, is there anything wrong in the code??

SearchRequestBuilder srb = getClient().prepareSearch()
                    .setSearchType(SearchType.COUNT)
                    .setIndices(esConfig.getIndexName());
           
        srb.setExtraSource(XContentFactory.jsonBuilder().startObject()
                    .startObject("facets")
                    .startObject("facet1")
                    .startObject("script")
                    .field("init_script", "charfreq_init")
                    .field("map_script", "charfreq_map")
                    .field("reduce_script", "charfreq_reduce")
                    .startObject("params")
                    .startArray("facet")
                    .endArray()
                    .field("field", "DATA_ID")
                    .endObject()
                    .endObject()
                    .endObject()
                    .endObject()
                    .endObject());

      SearchResponse  response = srb.execute().actionGet();



--
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].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: error using facet script plugin for Java API

dadoonet
Are you sure that your client version is the same as your node version?

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 31 juil. 2013 à 22:35, Kajal Patel <[hidden email]> a écrit :

I am trying to use facet-script plugin, it works fine through elastic search head.
But when i try to do the same thing with java api using transport elastic search client it throws below null pointer exception.
FYI: I am using elastic search 90.0 version and facet-script plugin 1.1.0 version.

WARN  [2013-07-31 20:24:45,980] org.elasticsearch.transport.netty: [Phoenix] Message not fully read (response) for [50] handler org.elasticsearch.action.TransportActionNodeProxy$1@8a590d1, error [false], resetting
ERROR [2013-07-31 20:24:45,980] STDERR: org.elasticsearch.transport.TransportSerializationException: Failed to deserialize response of type [org.elasticsearch.action.search.SearchResponse]
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:150)
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:127)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:150)
        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:127)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)ERROR [2013-07-31 20:24:45,981] STDERR:        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)ERROR [2013-07-31 20:24:45,981] STDERR:   at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)

        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)ERROR [2013-07-31 20:24:45,981] STDERR:        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)

        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)ERROR [2013-07-31 20:24:45,981] STDERR:   at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)

        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)ERROR [2013-07-31 20:24:45,981] STDERR:       at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)

        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)

ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
Caused by: java.lang.NullPointerException
        at org.elasticsearch.search.facet.InternalFacets.readFrom(InternalFacets.java:144)ERROR [2013-07-31 20:24:45,981] STDERR:       at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)

        at org.elasticsearch.search.facet.InternalFacets.readFacets(InternalFacets.java:130)
        at org.elasticsearch.search.internal.InternalSearchResponse.readFrom(InternalSearchResponse.java:99)ERROR [2013-07-31 20:24:45,981] STDERR:     at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)

        at org.elasticsearch.search.internal.InternalSearchResponse.readInternalSearchResponse(InternalSearchResponse.java:91)
        at org.elasticsearch.action.search.SearchResponse.readFrom(SearchResponse.java:219)
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:148)ERROR [2013-07-31 20:24:45,982] STDERR:        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)



Here is the code sample, is there anything wrong in the code??

SearchRequestBuilder srb = getClient().prepareSearch()
                    .setSearchType(SearchType.COUNT)
                    .setIndices(esConfig.getIndexName());
           
        srb.setExtraSource(XContentFactory.jsonBuilder().startObject()
                    .startObject("facets")
                    .startObject("facet1")
                    .startObject("script")
                    .field("init_script", "charfreq_init")
                    .field("map_script", "charfreq_map")
                    .field("reduce_script", "charfreq_reduce")
                    .startObject("params")
                    .startArray("facet")
                    .endArray()
                    .field("field", "DATA_ID")
                    .endObject()
                    .endObject()
                    .endObject()
                    .endObject()
                    .endObject());

      SearchResponse  response = srb.execute().actionGet();



--
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].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
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].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: error using facet script plugin for Java API

kajal
Yes, both are same. 90.0.

On Thursday, August 1, 2013 1:50:08 AM UTC-4, David Pilato wrote:
Are you sure that your client version is the same as your node version?

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 31 juil. 2013 à 22:35, Kajal Patel <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="SI1b-GqrHUcJ">kaj...@...> a écrit :

I am trying to use facet-script plugin, it works fine through elastic search head.
But when i try to do the same thing with java api using transport elastic search client it throws below null pointer exception.
FYI: I am using elastic search 90.0 version and facet-script plugin 1.1.0 version.

WARN  [2013-07-31 20:24:45,980] org.elasticsearch.transport.netty: [Phoenix] Message not fully read (response) for [50] handler org.elasticsearch.action.TransportActionNodeProxy$1@8a590d1, error [false], resetting
ERROR [2013-07-31 20:24:45,980] STDERR: org.elasticsearch.transport.TransportSerializationException: Failed to deserialize response of type [org.elasticsearch.action.search.SearchResponse]
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:150)
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:127)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:150)
        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:127)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)ERROR [2013-07-31 20:24:45,981] STDERR:        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)ERROR [2013-07-31 20:24:45,981] STDERR:   at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)

        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)ERROR [2013-07-31 20:24:45,981] STDERR:        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)

        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)ERROR [2013-07-31 20:24:45,981] STDERR:   at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)

        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)ERROR [2013-07-31 20:24:45,981] STDERR:       at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)

        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)

ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
Caused by: java.lang.NullPointerException
        at org.elasticsearch.search.facet.InternalFacets.readFrom(InternalFacets.java:144)ERROR [2013-07-31 20:24:45,981] STDERR:       at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)

        at org.elasticsearch.search.facet.InternalFacets.readFacets(InternalFacets.java:130)
        at org.elasticsearch.search.internal.InternalSearchResponse.readFrom(InternalSearchResponse.java:99)ERROR [2013-07-31 20:24:45,981] STDERR:     at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)

        at org.elasticsearch.search.internal.InternalSearchResponse.readInternalSearchResponse(InternalSearchResponse.java:91)
        at org.elasticsearch.action.search.SearchResponse.readFrom(SearchResponse.java:219)
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:148)ERROR [2013-07-31 20:24:45,982] STDERR:        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)



Here is the code sample, is there anything wrong in the code??

SearchRequestBuilder srb = getClient().prepareSearch()
                    .setSearchType(SearchType.COUNT)
                    .setIndices(esConfig.getIndexName());
           
        srb.setExtraSource(XContentFactory.jsonBuilder().startObject()
                    .startObject("facets")
                    .startObject("facet1")
                    .startObject("script")
                    .field("init_script", "charfreq_init")
                    .field("map_script", "charfreq_map")
                    .field("reduce_script", "charfreq_reduce")
                    .startObject("params")
                    .startArray("facet")
                    .endArray()
                    .field("field", "DATA_ID")
                    .endObject()
                    .endObject()
                    .endObject()
                    .endObject()
                    .endObject());

      SearchResponse  response = srb.execute().actionGet();



--
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="SI1b-GqrHUcJ">elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
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].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: error using facet script plugin for Java API

kajal
I was debugging through it and realize it not registering the stream for internalScriptFacet. SInce its not registering it doesnt know how to read and write from the stream.
I don't know the solution though. I installed the as they suggested here https://github.com/imotov/elasticsearch-facet-script.

On Thursday, August 1, 2013 9:31:03 AM UTC-4, Kajal Patel wrote:
Yes, both are same. 90.0.

On Thursday, August 1, 2013 1:50:08 AM UTC-4, David Pilato wrote:
Are you sure that your client version is the same as your node version?

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 31 juil. 2013 à 22:35, Kajal Patel <[hidden email]> a écrit :

I am trying to use facet-script plugin, it works fine through elastic search head.
But when i try to do the same thing with java api using transport elastic search client it throws below null pointer exception.
FYI: I am using elastic search 90.0 version and facet-script plugin 1.1.0 version.

WARN  [2013-07-31 20:24:45,980] org.elasticsearch.transport.netty: [Phoenix] Message not fully read (response) for [50] handler org.elasticsearch.action.TransportActionNodeProxy$1@8a590d1, error [false], resetting
ERROR [2013-07-31 20:24:45,980] STDERR: org.elasticsearch.transport.TransportSerializationException: Failed to deserialize response of type [org.elasticsearch.action.search.SearchResponse]
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:150)
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:127)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:150)
        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:127)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)ERROR [2013-07-31 20:24:45,981] STDERR:        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)ERROR [2013-07-31 20:24:45,981] STDERR:   at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)

        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)ERROR [2013-07-31 20:24:45,981] STDERR:        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)

        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)ERROR [2013-07-31 20:24:45,981] STDERR:   at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)

        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)ERROR [2013-07-31 20:24:45,981] STDERR:       at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)

        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)

ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
ERROR [2013-07-31 20:24:45,981] STDERR:         at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
Caused by: java.lang.NullPointerException
        at org.elasticsearch.search.facet.InternalFacets.readFrom(InternalFacets.java:144)ERROR [2013-07-31 20:24:45,981] STDERR:       at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)

        at org.elasticsearch.search.facet.InternalFacets.readFacets(InternalFacets.java:130)
        at org.elasticsearch.search.internal.InternalSearchResponse.readFrom(InternalSearchResponse.java:99)ERROR [2013-07-31 20:24:45,981] STDERR:     at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)

        at org.elasticsearch.search.internal.InternalSearchResponse.readInternalSearchResponse(InternalSearchResponse.java:91)
        at org.elasticsearch.action.search.SearchResponse.readFrom(SearchResponse.java:219)
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:148)ERROR [2013-07-31 20:24:45,982] STDERR:        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)



Here is the code sample, is there anything wrong in the code??

SearchRequestBuilder srb = getClient().prepareSearch()
                    .setSearchType(SearchType.COUNT)
                    .setIndices(esConfig.getIndexName());
           
        srb.setExtraSource(XContentFactory.jsonBuilder().startObject()
                    .startObject("facets")
                    .startObject("facet1")
                    .startObject("script")
                    .field("init_script", "charfreq_init")
                    .field("map_script", "charfreq_map")
                    .field("reduce_script", "charfreq_reduce")
                    .startObject("params")
                    .startArray("facet")
                    .endArray()
                    .field("field", "DATA_ID")
                    .endObject()
                    .endObject()
                    .endObject()
                    .endObject()
                    .endObject());

      SearchResponse  response = srb.execute().actionGet();



--
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.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
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].
For more options, visit https://groups.google.com/groups/opt_out.