lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Coutinho <rcouti...@odyssey-group.com>
Subject Removing indexed document
Date Tue, 04 Nov 2003 10:16:43 GMT
Hi all,

I am trying to delete an indexed document. I followed an example but I am
not getting the results I expect...

This is my test case.
I have index 2 documents with unique keywords so that I can recognise them
i.e.

...
...
doc.add(Field.Keyword("uri",
"jdbc://theHost/thePath#uuid=8dc8946e0a28645e01a428240000000e");
writer.addDocument(doc);
writer.close();
...

and

...
...
doc.add(Field.Keyword("uri",
"jdbc://theHost/thePath#uuid=8c5419bc0a28645e0089db9a0000016b");
writer.addDocument(doc);
writer.close();

...


My problem is that when I pass in the id for document
'8c5419bc0a28645e0089db9a0000016b', Lucene is removing document
'8dc8946e0a28645e01a428240000000e'

This is my code for the delete

TermEnum uidIter = reader.terms(new Term("uri",
"jdbc://theHost/thePath#uuid=8c5419bc0a28645e0089db9a0000016b");
while(uidIter.next())
{
	Term t = uidIter.term();
	getLogger().debug("unindexing text() " + t.text());

	reader.delete(t);
}

My debug statement shows me that it deletes the wrong document...
10:59:30,577 DEBUG [DocumentIndexerService] unindexing text()
jdbc://theHost/thePath#uuid=8dc8946e0a28645e01a428240000000e

I am quite new to Lucene so all healp is gratly appreciated

Thanks


Ricardo
__________________________________________________________________________
* This email and any files transmitted with it are CONFIDENTIAL and intended
solely for the use of the individual or entity to which they are addressed.
* Any unauthorized copying, disclosure, or distribution of the material
within
this email is strictly forbidden.
* Any views or opinions presented within this e-mail are solely those of the
author and do not necessarily represent those of Odyssey Asset Management
Systems SA unless otherwise specifically stated.
* An electronic message is not binding on its sender.  Any message referring
to
a binding engagement must be confirmed in writing and duly signed.
* If you have received this email in error, please notify the sender
immediately
and delete the original.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message