dcsimg
getting exception on deleteDocuments(Term)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Siraj_Haider
Posted On:   Monday, June 12, 2006 09:03 AM

Hello there I have a servlet running the code to manage a lucene index. In that servlet I am running the following line of code : int deleted = indexReader.deleteDocuments(new Term("DOCUMENTID", document_id)); this code has been working fine on Lucene 1.9.1, until I upgraded to the new Lucene 2.0.0. Now the servlet is throwing this exception : Exception in thread "Thread-111" java.lang.NoSuchMethodError: org.apache.lucene.index.IndexReader.deleteDocuments(Lorg/apache/lucene/index/Term;)I at com.axelon.lucene.LuceneIndexModifier.deleteFile(LuceneIndexModifier.java:161) at com.axelon.lucene.LuceneIndexModifier.deleteDocumentsFromIndex(LuceneIndexMod   More>>

Hello there

I have a servlet running the code to manage a lucene index. In that servlet I am running the following line of code :

int deleted = indexReader.deleteDocuments(new Term("DOCUMENTID", document_id));



this code has been working fine on Lucene 1.9.1, until I upgraded to the new Lucene 2.0.0. Now the servlet is throwing this exception :



Exception in thread "Thread-111" java.lang.NoSuchMethodError: org.apache.lucene.index.IndexReader.deleteDocuments(Lorg/apache/lucene/index/Term;)I

at com.axelon.lucene.LuceneIndexModifier.deleteFile(LuceneIndexModifier.java:161)

at com.axelon.lucene.LuceneIndexModifier.deleteDocumentsFromIndex(LuceneIndexModifier.java:136)

at com.axelon.lucene.LuceneIndexModifier.indexDocuments(LuceneIndexModifier.java:61)

at com.axelon.lucene.LuceneIndexThread.run(LuceneIndex.java:251)



is this method already been depricated and removed from the code? I didnt see any announcement for that, plus API Documentation still has this method mentioned.

thanks

Siraj

   <<Less

Re: getting exception on deleteDocuments(Term)

Posted By:   Siraj_Haider  
Posted On:   Monday, June 12, 2006 03:31 PM

Sorry for getting panicked before finding out whatÂ’s wrong at my end. Infact, the lucene 2.0.0 jar file that I copied to my servlet library path was corrupted.


-Siraj

About | Sitemap | Contact