lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cheolgoo Kang <app...@gmail.com>
Subject Re: retrieving added document
Date Wed, 24 Nov 2004 00:41:37 GMT
On Tue, 23 Nov 2004 22:47:21 +0100, Paul <paul.fuehring@gmail.com> wrote:
> Hi,
> I'm creating a document and adding it with a writer to the index. For
> some reason I need to add data to this specific document later on
> (minutes, not hours or days). Is it possible to retrieve it and add
> additonal data?

No, you cannot add additional data (or modify) to previously added document.
It's easy to delete the old one from the index and add a new document with
additional data included.

> I found the document(int n) - method within the IndexReader (btw: the
> description makes no sense for me: "Returns the stored fields of the
> nth Document in this index." - but it returns a Document and not a
> list of fields..) but where do I get that number from? (and the
> numbers change, I know..)

Usually you search using IndexSearcher and it's resulting Hits has the doc-id
(the number) in that index. And the Document contains the list of
(stored) fields.

> 
> thanks for any help
> 
> Paul
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 


-- 
Cheolgoo, Kang

---------------------------------------------------------------------
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