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 Paul <pa...@gmail.com> on 2004/11/23 22:47:21 UTC
retrieving added document
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?
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..)
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
Re: retrieving added document
Posted by Cheolgoo Kang <ap...@gmail.com>.
On Tue, 23 Nov 2004 22:47:21 +0100, Paul <pa...@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