lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morus Walter <morus.wal...@tanto.de>
Subject Re: (n00b) Meaning of Hits.id (int)
Date Thu, 09 Sep 2004 12:26:22 GMT
Peter Pimley writes:
> 
> My documents are not stored in their original form by lucene, but in a 
> seperate database.  My lucene docs do however store the primary key, so 
> that I can fetch the original version from the database to show the user 
> (does that sound sane?)
> 
yes.

> I see that the 'Hits' class has an id (int) method, which sounds 
> interesting.  The javadoc says "Returns the id for the nth document in 
> this set.".  However, I can't find any mention anywhere else about 
> Document ids.  Could anybody explain what this is?
> 
It's lucenes internal id or document number which allows you to access
the document and its stored fields.

See 
IndexSearcher.doc(int i)
or
IndexReader.document(int n)

The docs just don't name the parameter 'id'.

Morus

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message