Hi, Correct me if l am wrong, but doesn't the StandardTokenizer cast all alphabets into lower case? Hence where your ISBN contains an 'X', it has been tokenized as an 'x'.
Regards, Derrick www.thomastelford.com Civil engineers at the heart of society, delivering sustainable development through knowledge, skills and professional expertise. -----Original Message----- From: Gautam Lad [mailto:[EMAIL PROTECTED] Sent: 14 May 2008 03:31 To: lucene-net-user@incubator.apache.org Subject: RE: Can't delete documents I am using a StandardAnalyzer. And I wasn't aware that casing had an effect on indexing? If I don't tokenize that field, don't I lose the ability to search that field then? -----Original Message----- From: Michael Garski [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 5:08 PM To: lucene-net-user@incubator.apache.org Subject: RE: Can't delete documents What analyzer are you using when you add the document? My first guess would be that when you are indexing the field the 'X' is getting removed when the field value is tokenized. Alternatively you can opt not to tokenize that field. Michael -----Original Message----- From: Gautam Lad [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 1:34 PM To: lucene-net-user@incubator.apache.org Subject: Can't delete documents Hi there I have indexed my documents using various keys, and one of the keys is an ISBN. ISBNs can be all numeric or have an X at the end, (eg. 123456789X or 1234567890) Each of my documents is added to an index like so: doc.Add(New Field(key.Name, key.Value, Field.Store.YES, Field.Index.TOKENIZED)) Here, key.Name = "isbn" and key.value = "123456789X" When I delete documents I use the following piece of code: Public Sub DeleteSpecificKey() Dim LReader As Index.IndexReader = Index.IndexReader.Open(Store.FSDirectory.GetDirectory(IndexDir, False)) Dim iResult As Integer iResult = LReader.DeleteDocuments("isbn", "123456789X")) LReader.Close() End Sub However, since there's an "X" in the key value, it doesn't delete it. If the value was all numeric it works fine. What am I missing here? Everything else works fine as far as searching goes. Thanks, __________ Information from ESET NOD32 Antivirus, version of virus signature database 3097 (20080514) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service on behalf of the Institution of Civil Engineers. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ _______________________________________________________________________ This communication, and the information it contains: (a) is intended for the person(s) or organisation(s) named above and for no other persons or organisations and (b) may be confidential and protected by law. Unauthorised use, copying or disclosure of any of it may be unlawful. Thomas Telford Ltd Company Registration No: 2556636 Registered Office: 1-7 Great George Street, London SW1P 3AA. This email has been scanned for all viruses by the MessageLabs SkyScan service on behalf of the Institution of Civil Engineers. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________