Hey Guys,
I am using spring data elasticsearch in my project and I am facing the
following problem. Please help.
Code:
IndexRequest indexRequest = new IndexRequest();
indexRequest.source("viewer", *true*);
UpdateQuery updateQuery = *new*UpdateQueryBuilder().withId(documentID).
withIndexRequest(indexRequest).build();
updateQuery.setIndexName(SearchConstants.*INDEX_NAME*);
updateQuery.setType(SearchConstants.*INDEX_TYPE_BOOK*+"_"
+book.getBookmetadata().getLanguage());
//logger.debug("Indexing book " + documentID + ":" +
book.getBookmetadata().getTitle());
elasticsearchTemplate.update(updateQuery);
Error
org.elasticsearch.common.util.concurrent.UncategorizedExecutionException:
Failed execution
at
org.elasticsearch.action.support.AdapterActionFuture.rethrowExecutionException(
AdapterActionFuture.java:88)
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(*
AdapterActionFuture.java:49*)
at
org.springframework.data.elasticsearch.core.ElasticsearchTemplate.update(*
ElasticsearchTemplate.java:226*)
at
com.pearson.nexttext.plugins.service.elasticsearch.searchservices.impl.BookIndexingServiceImpl.reIndexBook(
BookIndexingServiceImpl.java:126)
at
com.pearson.nexttext.service.api.service.impl.BookIndexServiceImpl.reIndexBook(
BookIndexServiceImpl.java:25)
at
com.pearson.nexttext.service.api.controller.IndexController.reIndexBook(*
IndexController.java:58*)
at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)
at sun.reflect.NativeMethodAccessorImpl.invoke(*
NativeMethodAccessorImpl.java:39*)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(*
DelegatingMethodAccessorImpl.java:25*)
at java.lang.reflect.Method.invoke(*Method.java:597*)
at
org.springframework.web.method.support.InvocableHandlerMethod.invoke(*
InvocableHandlerMethod.java:219*)
at
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(
InvocableHandlerMethod.java:132)
at
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(
ServletInvocableHandlerMethod.java:104)
at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(
RequestMappingHandlerAdapter.java:745)
at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(
RequestMappingHandlerAdapter.java:686)
at
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(
AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(*
DispatcherServlet.java:925*)
at org.springframework.web.servlet.DispatcherServlet.doService(*
DispatcherServlet.java:856*)
at org.springframework.web.servlet.FrameworkServlet.processRequest(*
FrameworkServlet.java:936*)
at org.springframework.web.servlet.FrameworkServlet.doPost(*
FrameworkServlet.java:838*)
at javax.servlet.http.HttpServlet.service(*HttpServlet.java:727*)
at org.springframework.web.servlet.FrameworkServlet.service(*
FrameworkServlet.java:812*)
at javax.servlet.http.HttpServlet.service(*HttpServlet.java:820*)
at org.mortbay.jetty.servlet.ServletHolder.handle(*
ServletHolder.java:487*)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(*
ServletHandler.java:1093*)
at
org.springframework.security.web.FilterChainProxy.doFilterInternal(*
FilterChainProxy.java:186*)
at org.springframework.security.web.FilterChainProxy.doFilter(*
FilterChainProxy.java:160*)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(*
DelegatingFilterProxy.java:346*)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(*
DelegatingFilterProxy.java:259*)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(*
ServletHandler.java:1084*)
at org.mortbay.jetty.servlet.ServletHandler.handle(*
ServletHandler.java:360*)
at org.mortbay.jetty.security.SecurityHandler.handle(*
SecurityHandler.java:216*)
at org.mortbay.jetty.servlet.SessionHandler.handle(*
SessionHandler.java:181*)
at org.mortbay.jetty.handler.ContextHandler.handle(*
ContextHandler.java:726*)
at org.mortbay.jetty.webapp.WebAppContext.handle(*
WebAppContext.java:405*)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(*
ContextHandlerCollection.java:206*)
at org.mortbay.jetty.handler.HandlerCollection.handle(*
HandlerCollection.java:114*)
at org.mortbay.jetty.handler.HandlerWrapper.handle(*
HandlerWrapper.java:152*)
at org.mortbay.jetty.Server.handle(*Server.java:324*)
at org.mortbay.jetty.HttpConnection.handleRequest(*
HttpConnection.java:505*)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(*
HttpConnection.java:843*)
at org.mortbay.jetty.HttpParser.parseNext(*HttpParser.java:648*)
at org.mortbay.jetty.HttpParser.parseAvailable(*HttpParser.java:211*)
at org.mortbay.jetty.HttpConnection.handle(*HttpConnection.java:380*)
at org.mortbay.io.nio.SelectChannelEndPoint.run(*
SelectChannelEndPoint.java:395*)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(*
QueuedThreadPool.java:488*)
Caused by: java.lang.IndexOutOfBoundsException: Readable byte limit
exceeded: 175
at
org.elasticsearch.common.netty.buffer.AbstractChannelBuffer.readByte(*
AbstractChannelBuffer.java:236*)
at
org.elasticsearch.transport.netty.ChannelBufferStreamInput.readByte(*
ChannelBufferStreamInput.java:132*)
at org.elasticsearch.common.io.stream.AdapterStreamInput.readByte(*
AdapterStreamInput.java:35*)
at org.elasticsearch.common.io.stream.StreamInput.readBoolean(*
StreamInput.java:252*)
at org.elasticsearch.action.update.UpdateRequest.readFrom(*
UpdateRequest.java:566*)
at
org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(*
MessageChannelHandler.java:204*)
at
org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(*
MessageChannelHandler.java:108*)
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)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(*
Channels.java:296*)
at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(
FrameDecoder.java:462)
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)
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)
at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(
OpenChannelsHandler.java:74)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(*
DefaultChannelPipeline.java:564*)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(*
DefaultChannelPipeline.java:559*)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(*
Channels.java:268*)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(*
Channels.java:255*)
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(*
NioWorker.java:88*)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(
AbstractNioWorker.java:109)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(*
AbstractNioSelector.java:312*)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(*
AbstractNioWorker.java:90*)
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(*
NioWorker.java:178*)
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(*
ThreadRenamingRunnable.java:108*)
at
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(*
DeadLockProofWorker.java:42*)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(*
ThreadPoolExecutor.java:886*)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(*
ThreadPoolExecutor.java:908*)
at java.lang.Thread.run(*Thread.java:619*)
Can you please point what I am doing wrong here. I have spent a lot of time
on this but I am not able to resolve this.
On Saturday, September 17, 2011 9:59:59 AM UTC+5:30, Medcl wrote:
hey,guys
I just pushed a elasticsearch plugin to github,
https://github.com/medcl/ElasticSearch.PartialUpdate
the plugin that allows you to update a specify fileds of a document,avoid
full reindex and reduce some traffic costs,
here is a quick intro:
how to play with this plguin?
- first,let’s index a doucument
curl -XDELETE http://localhost:9200/index/type1/1/
curl -XPOST http://localhost:9200/index/type1/1/ -d'{"name":"medcl","blog":"http://log.medcl.net"}'
{"ok":true,"_index":"index","_type":"type1","_id":"1","_version":1}
curl -XGET http://localhost:9200/index/type1/1/
{"_index":"index","_type":"type1","_id":"1","_version":1, "_source" : {"name":"medcl","blog":"http://log.medcl.net"}}
- ok,let’s update it,update a filed(name),and add a new filed(time)
curl -XPOST http://localhost:9200/index/type1/1/_update -d'{"name":"medcl?","time":"2011-1-1"}'
{"ok":true,"_index":"index","_type":"type1","_id":"1","_version":2}
- let’s get the document again,and you can see,the document is already
changed.
curl -XGET http://localhost:9200/index/type1/1/
{"_index":"index","_type":"type1","_id":"1","_version":2, "_source" : {"time":"2011-1-1","name":"medcl?","blog":"http://log.medcl.net"}}
mail:m...@medcl.net <javascript:>
blog:log.medcl.net
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.