Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User
problem deleting documents
 

Index | Next | Previous | View Flat


ismail at gmail

Oct 14, 2006, 10:59 PM


Views: 1676
Permalink
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

Subject User Time
problem deleting documents ismail at gmail Oct 14, 2006, 10:59 PM
    Re: problem deleting documents DORONC at il Oct 14, 2006, 11:10 PM
    Re: problem deleting documents ismail at gmail Oct 15, 2006, 3:18 AM
    Re: problem deleting documents cfowler at jwpepper Oct 15, 2006, 5:47 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.