lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mordo, Aviran (EXP N-NANNATEK)" <>
Subject RE: Deleting documents
Date Fri, 16 Sep 2005 14:54:19 GMT
Because when you add a document, the id is going thru an Analyzer, which
in your case uses a low case filter, but when you create a Term object
the term is not lower cased by an Analyzer.

If instead of using Field.Text for your ID, you'll use Keyword, then the
Analyzer will not lower case the ID



-----Original Message-----
From: Bogdan Munteanu [] 
Sent: Friday, September 16, 2005 10:40 AM
Subject: Deleting documents

I have a problem when deleting documents.
Lets say I have a Document object doc.
doc.add(Field.Text("contents","some records"));
IndexWriter.addDocument(doc);  Now if I want to delete the document with
id:index1,DML I do something like
IndexReader.delete(new Term("id", "index1,DML"));  And it is not
 I have debuged it and noticed that lucene compares my "index1,DML" 
parameter with it's internal value "index1,dml".
 So when I do:
 IndexReader.delete(new Term("id", "index1,dml")); the document is
 Now please explain me why is there a lower case value for my "id"?
And excuse my poor english!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message