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 Patrick Diviacco <pa...@gmail.com> on 2011/04/08 14:00:38 UTC

Indexing 1 doc only ?

Is there a way to update only 1 doc in the index rather than index the
entire collection everytime there is a change ?

Given a specific field (I use as ID) of my indexed doc, how can I select it
and update its other fields ?

thanks

Re: Indexing 1 doc only ?

Posted by Danica Damljanovic <da...@gmail.com>.
If I am not mistaken Lucene Q&A mentions that you  can update a document by
1. deleting it 2. adding the new one. Given that you have the ID this looks
straightforward.

Danica

On 8 April 2011 13:00, Patrick Diviacco <pa...@gmail.com> wrote:

> Is there a way to update only 1 doc in the index rather than index the
> entire collection everytime there is a change ?
>
> Given a specific field (I use as ID) of my indexed doc, how can I select it
> and update its other fields ?
>
> thanks
>



-- 
Best,
Danica Damljanovic
-- 
Research Associate
GATE team http://gate.ac.uk
Natural Language Processing Group
University of Sheffield
http://www.dcs.shef.ac.uk/~danica