|
From: <php...@li...> - 2007-11-08 12:46:55
|
I have the following problem, i updated my lucene java libraries to lucene-core-2.2.0.jar. the API docs tell me i could do an update on the indexwriter with a document. Everything works untill it reaches the update document. it gives me : Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:IndexWriter]]->updateDocument([o:Term], [o:Document]). Cause: java.lang.NoSuchMethodException: updateDocument([o:Term], [o:Document]). Candidates: [] It says NoSuchMethodException but i'm pretty sure it is there (checked the src files). API Page: http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/org/apache/lucene/index/IndexWriter.html snippit code: $oLuceneAnalyzer = luceneAnalyzer::getStandardAnalyzer(); $oLuceneWriter = new Java('org.apache.lucene.index.IndexWriter', '/srv/www/myindex',$oLuceneAnalyzer,false); for ($i = $this->nStart; $i < $this->nEnd; $i++) { $objDocument = $this->oLuceneHits->doc($i); $FieldStore = new JavaClass( 'org.apache.lucene.document.Field$Store' ); $FieldIndex = new JavaClass( 'org.apache.lucene.document.Field$Index' ); $FieldTermVector = new JavaClass( ' org.apache.lucene.document.Field$TermVector' ); $objDocument->add(new Java('org.apache.lucene.document.Field', 'sectionPublished', '2:14', $FieldStore->YES, $FieldIndex->UN_TOKENIZED, $FieldTermVector->YES )); $term = new java('org.apache.lucene.index.Term ','documentid',$this->oLuceneHits->doc($i)->get('documentid')); $oLuceneWriter->updateDocument($term,$objDocument); } $oLuceneWriter->close(); I tried to set logging in my php.ini settings but that doesn't seem to work, it just won't write a log file, php.in settings: java support Enabled java bridge 4.0.8a java.log_level 4 java.hosts 127.0.0.1:8080 java.servlet http://127.0.0.1:8080//JavaBridge/JavaBridge.phpjavabridge java.persistent_connections On java command JAVA_HOME=/usr/lib/jre LD_LIBRARY_PATH=/usr/local/Zend/Core/lib/php/20060613: /usr/lib/jre/bin/java -Djava.library.path=/usr/local/Zend/Core/lib/php/20060613 - Djava.class.path=/usr/local/Zend/Core/lib/php/20060613/JavaBridge.jar - Djava.awt.headless=true - Dphp.java.bridge.base=/usr/local/Zend/Core/lib/php/20060613 php.java.bridge.Standalone LOCAL:@java-bridge-3a61 4 /tmp/php- java-bridge.log java status running java server 127.0.0.1:8080 anyone got an idea how to fix this? Thanks in advance! -- Gilbert |