lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <li...@ehatchersolutions.com>
Subject Re: IndexReader.delete(Term)?
Date Tue, 26 Aug 2003 23:38:07 GMT
What you are doing looks fine to me.  I'm sure these are obvious 
questions, kinda like "is your computer plugged in?", but here goes:

- How are you determining that the document is still there?  With an 
IndexReader?  IndexSearcher?
- A freshly created (i.e. after the delete) Index[Searcher|Reader]?
- And finally, did you remember to recompile?!  :))  (just kidding)



On Tuesday, August 26, 2003, at 03:37  PM, petite_abeille wrote:

> Hello,
>
> This is more a sanity check, than anything else, but...
>
> I'm trying to delete a document using IndexReader.delete(Term)... (for 
> the record I'm using 1.3-rc1)
>
> The document was created with a Field.Keyword() to uniquely identify 
> it.
>
> The document exists, was saved, can be queried, life is good :)
>
> But then... when trying to delete the same document later on... 
> IndexReader.delete(Term) returns 0 and the document doesn't get 
> deleted... which is driving me crazy 8}
>
> Here is what I'm doing to delete the document:
>
>     Term	aTerm = new Term( aKey, anID );
>
>     aReader.delete( aTerm );
>     aReader.close();
>
> The term looks like the following:
>
> szid:3FA7168800F7FDE8ECAA35500A00012D
>
> But this doesn't seem to do anything... The document is still there no 
> matter what...
>
> I'm sure I'm doing something very wrong, but for the life of me I 
> cannot see what... anything obvious I'm missing?
>
> Thanks.
>
> Cheers,
>
> PA.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>


Mime
View raw message