lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dodson <mgdod...@mac.com>
Subject Retrieving a document from a Hits object
Date Sat, 10 Jun 2006 11:47:19 GMT
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)
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message