Mailing List Archive

how to update index
Hi all,

As I know there is no direct method for updating the index, so I have to delete the index first and then add the new entries in the index.I tried to find my answer in the mailing list but could not found my answer.
Now If I want to do above procedure then how exactly should I go? Is there any other way of updatng the index?

regards
Parag
Re: how to update index [ In reply to ]
First delete, then re-add. There must be a FAQ entry for this at
jGuru. Have you checked there?

Otis

--- Parag Dharmadhikari <parag@bsil.com> wrote:
> Hi all,
>
> As I know there is no direct method for updating the index, so I have
> to delete the index first and then add the new entries in the index.I
> tried to find my answer in the mailing list but could not found my
> answer.
> Now If I want to do above procedure then how exactly should I go? Is
> there any other way of updatng the index?
>
> regards
> Parag
>
>


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: how to update index [ In reply to ]
jguru tells you how to do individual documents, but not the entire index.

What about setting the flag when you create the IndexWriter to true? What
happens if the index already exists? Do you get an exception, or does it
write over the current index? You could always just delete the
directory...

Also, when deleting documents, one thing that got me is that if you ask
for the number of occurances of a document for a just-deleted document
based on a Term, you may get back a number greater than you
expected... The index doesn't seem to be aware that the document has been
deleted until you optimize the index.

thanks,
rob

http://www.robdecker.com/
http://www.planetside.com/

On Mon, 1 Apr 2002, Otis Gospodnetic wrote:

> First delete, then re-add. There must be a FAQ entry for this at
> jGuru. Have you checked there?
>
> Otis
>
> --- Parag Dharmadhikari <parag@bsil.com> wrote:
> > Hi all,
> >
> > As I know there is no direct method for updating the index, so I have
> > to delete the index first and then add the new entries in the index.I
> > tried to find my answer in the mailing list but could not found my
> > answer.
> > Now If I want to do above procedure then how exactly should I go? Is
> > there any other way of updatng the index?
> >
> > regards
> > Parag
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://http://taxes.yahoo.com/
>
> --
> To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: how to update index [ In reply to ]
Thanks For reply

I have checked on jguru and found some helpful links.
Now if I want to delete then I have to use method as
"IndexReader.delete(Term)".
But my question is before deleting the index I have to add the document to
the index and then I will delete the index.
but can please anybody will show me the way how to add the document using
Term(I have saw the APIs but still not clear about it).

regards
Parag

----- Original Message -----
From: "Otis Gospodnetic" <otis_gospodnetic@yahoo.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Tuesday, April 02, 2002 10:51 AM
Subject: Re: how to update index


> First delete, then re-add. There must be a FAQ entry for this at
> jGuru. Have you checked there?
>
> Otis
>
> --- Parag Dharmadhikari <parag@bsil.com> wrote:
> > Hi all,
> >
> > As I know there is no direct method for updating the index, so I have
> > to delete the index first and then add the new entries in the index.I
> > tried to find my answer in the mailing list but could not found my
> > answer.
> > Now If I want to do above procedure then how exactly should I go? Is
> > there any other way of updatng the index?
> >
> > regards
> > Parag
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://http://taxes.yahoo.com/
>
> --
> To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: how to update index [ In reply to ]
Parag,

>
>I have checked on jguru and found some helpful links.
>Now if I want to delete then I have to use method as
>"IndexReader.delete(Term)".
>But my question is before deleting the index I have to add the document to
>the index and then I will delete the index.
>but can please anybody will show me the way how to add the document using
>Term(I have saw the APIs but still not clear about it).

One would normally use the primary key field and value to create this term,
ie. the field that contains a value that uniquely identifies the
document in your index.

<snip>

Regards,
Ype

--

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