Ismail,

        I was having the same type of problem (using v2) until I changed 
my index to change the ID field from Field.Index.TOKENIZED to 
Field.Index.UN_TOKENIZED. Can you try that, or create a secondary field 
that is set up that way with your pk id in it?

Chris



"Ismail Siddiqui" <[EMAIL PROTECTED]> 
10/15/2006 01:58 AM
Please respond to
java-user@lucene.apache.org


To
java-user@lucene.apache.org
cc

Subject
problem deleting documents






hi guys
i am having problem deleting documents .. apparently its not doin it.. 
here
is the code snippet

     public void delete(final BoardMessage message)
     {
        try{

           IndexReader fsReader;

           if  (index.exists()) {
              fsReader  =IndexReader.open(index);
              fsReader.deleteDocuments(new Term("pk",message.getId()+""));
              fsReader.close();
           }

        }
        catch(IOException e){
         e.printStackTrace();
        }

now pk is primary key which i am storing but not indexing it..
     doc.add(new Field("pk", message.getId().toString(),Field.Store.YES,
                    Field.Index.NO));

when i am making a search i can get pk and show it in result...but above
code is not deleting the document

Reply via email to