lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wujun" <wu...@mxtrip.cn>
Subject Re:who can help?
Date Thu, 23 Nov 2017 06:26:26 GMT
<lucene.version>6.6.2</lucene.version>
  
------------------ Original ------------------
From:  "wujun"<wujun@mxtrip.cn>;
Date:  Thu, Nov 23, 2017 02:23 PM
To:  "java-user"<java-user@lucene.apache.org>; 

Subject:  who can help?

 
IndexSearcher searcher = new IndexSearcher(DirectoryReader.open(dir));

List<LeafReaderContext> leafReaderContextList = searcher.getTopReaderContext().leaves();

for (LeafReaderContext leafReaderContext : leafReaderContextList)

{

	long min = leafReaderContext.docBase;

	long count = leafReaderContext.reader().numDocs();

	if (docID >= min && docID < (min + count))

	{

		LeafReader leafReader = leafReaderContext.reader();

		

		NumericDocValues docVals = leafReader.getNumericDocValues(IndexConsts.INDEX_RATE_COUNT);

		NumericDocValues docVals2 = leafReader.getNumericDocValues(IndexConsts.INDEX_PLACETYPE);

		try

		{

			rateCount = docVals.get(docID); // the java.lang.IndexOutOfBoundsException

			placeType = docVals2.get(docID);

		} catch (Exception e)

		{

			logger.error("rateCount=" + rateCount + ",placeType=" + placeType + ",docID=" + docID +
",min="+ min + ",count=" + count,e);

		}




		break;

	}

}




[2017-11-23 14:03:08] http-nio-8080-exec-5 ERROR queqiao.searcher.search.SemanticsLuceneSearcher.format4SemanticSearchV4(SemanticsLuceneSearcher.java:202)
rateCount=0,placeType=0,docID=4572736,min=2097159,count=3976197 

 java.lang.IndexOutOfBoundsException

	at java.nio.Buffer.checkIndex(Buffer.java:546)

	at java.nio.DirectByteBuffer.getShort(DirectByteBuffer.java:594)

	at org.apache.lucene.store.ByteBufferGuard.getShort(ByteBufferGuard.java:123)

	at org.apache.lucene.store.ByteBufferIndexInput$SingleBufferImpl.readShort(ByteBufferIndexInput.java:400)

	at org.apache.lucene.util.packed.DirectReader$DirectPackedReader16.get(DirectReader.java:185)

	at org.apache.lucene.codecs.lucene54.Lucene54DocValuesProducer$2.get(Lucene54DocValuesProducer.java:501)

	at org.apache.lucene.util.LongValues.get(LongValues.java:45)

	at queqiao.searcher.search.SemanticsLuceneSearcher.format4SemanticSearchV4(SemanticsLuceneSearcher.java:198)

	at queqiao.searcher.search.SemanticsLuceneSearcher.search_V5(SemanticsLuceneSearcher.java:512)

	at queqiao.searcher.servlet.SemanticsAnswer.getPoiListInside(SemanticsAnswer.java:291)

	at queqiao.searcher.servlet.SemanticsAnswer.getPoiList(SemanticsAnswer.java:209)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:498)

	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)

	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)

	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)

	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)

	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)

	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)

	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)

	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)

	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)

	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)

	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)

	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)

	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)

	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)

	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)

	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)

	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)

	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)

	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)

	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)

	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

 

	at java.lang.Thread.run(Thread.java:745)
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message