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 Rosen Marinov <ro...@sirma.bg> on 2002/11/10 13:32:57 UTC
Delete document don't work
Hello,
I have the problem with deleting documents from index.
please see the my java code, i have in my index document
with field "ID" and value "12345", but this code don't
delete the document from my index.
Please tell me possible reason?
I haven't other opening readers, writers or searches on this index.
10x
--------------------------- Java Code ----------------------
IndexReader reader = IndexReader.open( path );
Term term = new Term("ID", "12345");
reader.delete(term);
reader.close();
Re: Delete document don't work
Posted by Terry Steichen <te...@net-frame.com>.
Rosen,
I would think that since the field is unindexed, that the search would turn
up nothing, and therefore would have nothing to delete.
Regards,
Terry
----- Original Message -----
From: "Rosen Marinov" <ro...@sirma.bg>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Sunday, November 10, 2002 7:51 AM
Subject: Re: Delete document don't work
> I forget to say that my Field is not Keyword
> it is UnIndexed field and i want to know
> how can i delete document from index with
> this UnUndexed field?
>
>
> ----- Original Message -----
> From: "Rosen Marinov" <ro...@sirma.bg>
> To: "Lucene Users List" <lu...@jakarta.apache.org>
> Sent: Sunday, November 10, 2002 2:32 PM
> Subject: Delete document don't work
>
>
> Hello,
>
> I have the problem with deleting documents from index.
>
> please see the my java code, i have in my index document
> with field "ID" and value "12345", but this code don't
> delete the document from my index.
>
> Please tell me possible reason?
>
> I haven't other opening readers, writers or searches on this index.
>
> 10x
> --------------------------- Java Code ----------------------
>
>
> IndexReader reader = IndexReader.open( path );
>
> Term term = new Term("ID", "12345");
>
> reader.delete(term);
>
> reader.close();
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Delete document don't work
Posted by Rosen Marinov <ro...@sirma.bg>.
I forget to say that my Field is not Keyword
it is UnIndexed field and i want to know
how can i delete document from index with
this UnUndexed field?
----- Original Message -----
From: "Rosen Marinov" <ro...@sirma.bg>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Sunday, November 10, 2002 2:32 PM
Subject: Delete document don't work
Hello,
I have the problem with deleting documents from index.
please see the my java code, i have in my index document
with field "ID" and value "12345", but this code don't
delete the document from my index.
Please tell me possible reason?
I haven't other opening readers, writers or searches on this index.
10x
--------------------------- Java Code ----------------------
IndexReader reader = IndexReader.open( path );
Term term = new Term("ID", "12345");
reader.delete(term);
reader.close();
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>