lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: Deleting documents
Date Fri, 16 Sep 2005 15:02:22 GMT
If you're indexing a field like this in order to be able to use it as a
reference later, you should normally index it using Field.Keyword
instead of Field.Text - if you use Text, it will go through your
Analyzer, which is probably what's changing the case. (I think this is
right - I'm sure someone will correct me if I'm wrong!)



-----Original Message-----
From: Bogdan Munteanu [] 
Sent: 16 September 2005 15:40
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"));
 Now if I want to delete the document with id:index1,DML I do something
IndexReader.delete(new Term("id", "index1,DML"));
 And it is not deleted.
 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 deleted.
 Now please explain me why is there a lower case value for my "id"?
And excuse my poor english!

The information contained in this email message may be confidential. If you are not the intended
recipient, any use, interference with, disclosure or copying of this material is unauthorised
and prohibited. Although this message and any attachments are believed to be free of viruses,
no responsibility is accepted by T&F Informa for any loss or damage arising in any way
from receipt or use thereof.  Messages to and from the company are monitored for operational
reasons and in accordance with lawful business practices. 
If you have received this message in error, please notify us by return and delete the message
and any attachments.  Further enquiries/returns can be sent to

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

View raw message