lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhu jiang" <ykzhuji...@gmail.com>
Subject Re: The handle is invalid
Date Wed, 02 Aug 2006 03:50:29 GMT
Yep, I close the IndexReader before navigating Hits. Isn't it permitted?

2006/8/2, Erik Hatcher <erik@ehatchersolutions.com>:
>
> Are you perhaps closing IndexReader or IndexSearcher before or while
> navigating Hits?
>
>        Erik
>
>
> On Aug 1, 2006, at 1:05 PM, zhu jiang wrote:
>
> > Hi Erik,
> >
> >    I use multi-threads to add lots of documents while querying. At the
> > begining,the query result is right, but after a while, when I query
> > again,
> > the exception thrown.Here is the stack trace:
> >
> > java.io.IOException: invalid handle
> > at java.io.RandomAccessFile.seek(Native Method)
> > at org.apache.lucene.store.FSIndexInput.readInternal
> > (FSDirectory.java:449)
> > at org.apache.lucene.store.BufferedIndexInput.refill(
> > BufferedIndexInput.java:64)
> > at org.apache.lucene.store.BufferedIndexInput.readByte(
> > BufferedIndexInput.java:33)
> > at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:56)
> > at org.apache.lucene.index.SegmentTermDocs.read
> > (SegmentTermDocs.java:125)
> > at org.apache.lucene.index.MultiTermDocs.read(MultiReader.java:365)
> > at org.apache.lucene.search.TermScorer.score(TermScorer.java:78)
> > at org.apache.lucene.search.TermScorer.score(TermScorer.java:60)
> > at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:
> > 132)
> > at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:
> > 99)
> > at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:65)
> > at org.apache.lucene.search.Hits.hitDoc(Hits.java:138)
> > at org.apache.lucene.search.Hits.id(Hits.java:116)
> > at com.intel.cit.search_engine.NormalResult.toString
> > (NormalResult.java:21)
> > at com.intel.cit.search_engine.NormalSearchService.process(
> > NormalSearchService.java:42)
> > at com.intel.cit.search_engine.ServicesManager.process
> > (ServicesManager.java
> > :76)
> > at com.intel.cit.search_engine.ServicesManager.process
> > (ServicesManager.java
> > :72)
> > at com.intel.cit.test.TestCore.query(TestCore.java:99)
> > at com.intel.cit.test.TestCore$6.widgetSelected(TestCore.java:240)
> > at org.eclipse.swt.widgets.TypedListener.handleEvent
> > (TypedListener.java:90)
> > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
> > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
> > 3125)
> > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
> > at com.intel.cit.test.TestCore.open(TestCore.java:86)
> > at com.intel.cit.test.TestCore.main(TestCore.java:71)
> > java.lang.IllegalArgumentException: Argument cannot be null
> > at org.eclipse.swt.SWT.error(SWT.java:2926)
> > at org.eclipse.swt.SWT.error(SWT.java:2865)
> > at org.eclipse.swt.SWT.error(SWT.java:2836)
> > at org.eclipse.swt.widgets.Widget.error(Widget.java:395)
> > at org.eclipse.swt.widgets.Text.setText(Text.java:1585)
> > at com.intel.cit.test.TestCore$6.widgetSelected(TestCore.java:240)
> > at org.eclipse.swt.widgets.TypedListener.handleEvent
> > (TypedListener.java:90)
> > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
> > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
> > 3125)
> > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
> > at com.intel.cit.test.TestCore.open(TestCore.java:86)
> > at com.intel.cit.test.TestCore.main(TestCore.java:71)
> >
> >
> > Thanks,
> > Jiang
> >
> > 2006/8/1, Erik Hatcher <erik@ehatchersolutions.com>:
> >>
> >>
> >> On Jul 31, 2006, at 11:34 PM, zhu jiang wrote:
> >> >    When I query, I got this exception:The handle is invalid. What
> >> > should I
> >> > do?
> >>
> >> You should give us a much more complete error message, including the
> >> stack trace.  :)
> >>
> >>        Erik
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-dev-help@lucene.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message