Jan 10, 2002, 9:53 AM
Post #3 of 4
(1150 views)
Permalink
Thanks , Ian for the solution. It works now.
In the api doc I am looking at , this is not mentioned.
I am using the lucene-1.2-rc2.
I am just wondering if i am using the current version of
lucene. Could you let me know where I can find the latest one.
The api i have says:
****************************************************************************
************
delete
public abstract void delete(int docNum)
throws IOException
Deletes the document numbered docNum. Once a document is deleted it will not
appear in TermDocs or TermPostitions enumerations. Attempts to read its
field with the document(int) method will result in an error. The presence of
this document may still be reflected in the
docFreq(org.apache.lucene.index.Term) statistic, though this will be
corrected eventually as the index is further modified.
****************************************************************************
**********
Thanks
Swamy
----------------------------------------------------------------------------
----
-----Original Message-----
From: Ian Lea [mailto:ian.lea@blackwell.co.uk]
Sent: Thursday, January 10, 2002 5:04 AM
To: Lucene Users List
Subject: Re: Problem in deleteing the documents
If you read the javadoc for IndexReader.delete() you will
see that deleted documents don't disappear immediately,
unless you call optimize(), but will disappear as the index
gets modified further.
IndexReader.isDeleted(i) says whether a particular document
has been deleted.
--
Ian Lea
ian.lea@blackwell.co.uk
"Thutika, Swamy" wrote:
>
> Hi,
> I am not able to delete the documents from the index. Could someone
please
> exaplain me as to what am i doing
> working. I attached the delete and indexing code below:
>
> <<IdxReader.java>> <<DeleteFile.java>>
>
> Before deleting the output of IdxReader is :
> N umber of docs :1
> Term<body:are>
> Term<body:deleted>
> Term<body:getting>
> Term<body:not>
> Term<body:why>
> Term<body:you>
> Term<path:docone>
>
> After delete:
> umber of docs :0
> Term<body:are>
> Term<body:deleted>
> Term<body:getting>
> Term<body:not>
> Term<body:why>
> Term<body:you>
> Term<path:docone>
>
> Thanks in advance
>
> Swamy
--
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>