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 theres an X in the key value, it doesnt 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,