Hi Michael, The Searcher you used to get the Hits needs to remain open while accessing the hits. Your stack trace could have been caused by the Searcher being closed first.
-Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server On 6/10/06, Michael Dodson <[EMAIL PROTECTED]> wrote:
Hi, I'm trying to retrieve a document from a Hits object and I'm getting the following exception and stack trace. I have a Hits object named "hits" and I'm just trying to retrieve the first document using Document doc = hits.doc(0); I can retrieve all other kinds of information for the document using hits.score(0), hits.id(0), etc but it won't let me retrieve a document. Any help is greatly appreciated. Thanks. Mike java.io.IOException: Bad file descriptor at java.io.RandomAccessFile.seek(Native Method) at org.apache.lucene.store.FSIndexInput.readInternal (FSDirectory.java:444) 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.readInt(IndexInput.java:46) at org.apache.lucene.store.IndexInput.readLong(IndexInput.java:69) at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:62) at org.apache.lucene.index.SegmentReader.document(SegmentReader.java: 284) at org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:83) at org.apache.lucene.search.Hits.doc(Hits.java:103) at diploma.project.content.AddContentToContext.addContentToContextDocs (AddContentToContext.java:124) at diploma.project.content.AddContentToContext.combineIndices (AddContentToContext.java:67) at diploma.project.content.AddContentToContext.main (AddContentToContext.java:42)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]