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 Toby Tremayne <To...@lonelyplanet.com.au> on 2004/07/01 02:28:49 UTC

Adding to an existing document

Hi all,

      I have an index which contains information from a forum database

 

- one document per thread, containing all messages in a big text field.  If
I wanted to add a new message string to and existing thread, is there some
way I can append it to the document?

 

cheers,

Toby

 

-------------------------------------------------------------------

 

     Life is poetry - write it in your own words

 

-------------------------------------------------------------------

 

Toby Tremayne

Code Poet and Zen Master of the Heavy Sleep

Lonely Planet Publications

+61 416 048 090

ICQ: 13107913

 



______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright.  If you
have received this email in error, please advise the sender and delete
it.  If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone.  You must not copy or 
communicate to others content that is confidential or subject to 
copyright, unless you have the consent of the content owner.

Re: Adding to an existing document

Posted by Peter M Cipollone <lu...@bihvhar.com>.
----- Original Message ----- 
From: "Toby Tremayne" <To...@lonelyplanet.com.au>
To: <lu...@jakarta.apache.org>
Sent: Wednesday, June 30, 2004 8:28 PM
Subject: Adding to an existing document


>
> Hi all,
>
>       I have an index which contains information from a forum database
>
>
>
> - one document per thread, containing all messages in a big text field.
If
> I wanted to add a new message string to and existing thread, is there some
> way I can append it to the document?

In Lucene, the only way to modify a document is to delete it and replace it
with the new version.  Given that you are working with discussion threads,
you might instead consider adding fields for thread ID and thread serial
number to each article. You could then append to threads, view entire
threads in order or delete threads as you wish using Lucene's APIs.

Pete

>
>
>
> cheers,
>
> Toby
>
>
>
> -------------------------------------------------------------------
>
>
>
>      Life is poetry - write it in your own words
>
>
>
> -------------------------------------------------------------------
>
>
>
> Toby Tremayne
>
> Code Poet and Zen Master of the Heavy Sleep
>
> Lonely Planet Publications
>
> +61 416 048 090
>
> ICQ: 13107913
>
>
>
>
>
> ______________________________________________________________________
> This email, including attachments, is intended only for the addressee
> and may be confidential, privileged and subject to copyright.  If you
> have received this email in error, please advise the sender and delete
> it.  If you are not the intended recipient of this email, you must not
> use, copy or disclose its content to anyone.  You must not copy or
> communicate to others content that is confidential or subject to
> copyright, unless you have the consent of the content owner.


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