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 Carlos del Cacho <de...@gmail.com> on 2008/08/22 16:36:56 UTC
question about modifying indexed Documents
Hello,
I'd like to modify a Field in an already indexed Document. The only way so
far that I have found is to delete the document through an IndexReader and
add a new one with an IndexWriter. This has the undesirable property that it
alters existing search results for a given keyword. Is there a better way to
do this?
Thanks,
Carlos
Re: question about modifying indexed Documents
Posted by Erick Erickson <er...@gmail.com>.
Not that I know of. But if you're storing Lucene doc IDs as part of
existing search results, you're playing with fire anyway. Unless there's
a compelling reason to avoid it, you're usually better off storing your
own unique doc ID in a different field and using that because you can
guarantee that it's invariant.
Best
Erick
On Fri, Aug 22, 2008 at 10:36 AM, Carlos del Cacho <de...@gmail.com>wrote:
> Hello,
>
> I'd like to modify a Field in an already indexed Document. The only way so
> far that I have found is to delete the document through an IndexReader and
> add a new one with an IndexWriter. This has the undesirable property that
> it
> alters existing search results for a given keyword. Is there a better way
> to
> do this?
>
> Thanks,
> Carlos
>