You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Nicolas Maisonneuve <n....@hotPop.com> on 2004/01/17 12:12:02 UTC
IndexReader.document(int i)
hy,
i would like to know
in the IndexReader.document(int i)
what is this number i ?
if the the first document is the oldest document indexed
and the last the youngest ? (so we can sort by date easyly) ?
thank in advance
nico
Re: IndexReader.document(int i)
Posted by Karl Koch <Th...@gmx.net>.
Hello back,
according to the JavaDoc it means:
"Returns the stored fields of the nth Document in this index."
In your case than if would mean the greater n the younger the doc. However I
am not sure how you can create such an index. I think you should have a look
to the Luke project, which allows you ot access and look into Lucene
Indices.
If I did not answer your question, please explain a little bit further...
Karl
> hy,
> i would like to know
> in the IndexReader.document(int i)
> what is this number i ?
> if the the first document is the oldest document indexed
> and the last the youngest ? (so we can sort by date easyly) ?
>
> thank in advance
>
> nico
--
+++ GMX - die erste Adresse für Mail, Message, More +++
Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: IndexReader.document(int i)
Posted by Doug Cutting <cu...@apache.org>.
Nicolas Maisonneuve wrote:
> i would like to know
> in the IndexReader.document(int i)
> what is this number i ?
> if the the first document is the oldest document indexed
> and the last the youngest ? (so we can sort by date easyly) ?
Yes, documents with lower numbers were indexed earlier. As documents
are deleted the numbers of other, higher documents shift downwards, but
the order of document numbers always represents the order that documents
were added to the index.
Doug
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org