lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshum <ansh...@gmail.com>
Subject Re: update a specific document
Date Fri, 19 Jun 2009 04:32:09 GMT
HI Galaio,
To update a document in lucene this way, you'd have to first delete the
document
using indexReader's delete document and then readd the document (thereby
changing the internal docId as well).
You may use:
http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/index/IndexReader.html#deleteDocument(int)


--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Fri, Jun 19, 2009 at 3:50 AM, João Silva <galaio.silva@gmail.com> wrote:

> Hi,
> I want to update a specific document,
> but i didn't found updateDocument(Query)
> or updateDocument(Term[]), so to make
> a update, i will need to have a term with an
> unique id, so a retrieve a u)nique document,
> There's any way of access the internal document
> id?
> For example, imagine that i have the id of document
> to update, and i want to update(Term,Document) but passing
> the internal id as Term.
>
> cheers,
> João
>
>
> --
> Cumprimentos,
> João Carlos Galaio da Silva
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message