Hi, We were starting to learn and use lucene about 3 weeks ago, it is really a great product! Here we have some problems with certain JVM versions (SUN jdk). We are using lucene-1.4-rc2 on Solaris 2.8 platform:
(1) We have a program to index about 230 documents. If using jdk1.4.1_02, our program often hanged at IndexWriter.addDocument(doc); At which document it hanges is essentially random. My question is: is there any known issues with jdk1.4.1_02 and lucene-1.4-rc2 (BUILD.txt said any jdk later than 1.2 is OK) ? (2) We also found for some trivial search program, jdk1.3.0 would crash, but jdk1.3.1_03 is OK (below I attached my search code). If running on jdk1.3.0, I got the following message (at the line calling IndexSearcher.search(...)): ##################################################### # HotSpot Virtual Machine Error, Unexpected Signal 11 # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Error ID: 4F533F534F4C415249530E435050079A 01 # # Problematic Thread: prio=5 tid=0x29800 nid=0x1 runnable ##################################################### Is this a known problem with jdk1.3.0 ? The same program run through with jdk1.3.1_03 fine. I would really appreciate any help and guidance on these two issues. Best regards, Lisheng ################################################## import java.io.*; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.*; import org.apache.lucene.index.Term; import org.apache.lucene.search.Searcher; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; import org.apache.lucene.search.Hits; import org.apache.lucene.search.Sort; import org.apache.lucene.queryParser.QueryParser; class UrSearch { private static void log(String msg) { System.out.println(msg); } public static void main(String[] argv) { try { Searcher searcher = new IndexSearcher("./myindex"); Searcher[] searches = new Searcher[1]; searches[0] = searcher; Analyzer analyzer = new StandardAnalyzer(); Query query0 = simpleQuery(analyzer); log("Q=" + query0.toString()); log("QueryClass=" + query0.getClass().toString()); Sort sort = new Sort(); // Crash on this line if jdk1.3.0 !!! Hits hits = searcher.search(query0, sort); log(hits.length() + " total matching documents"); for(int i=0; i<hits.length(); i++) { Document doc = hits.doc(i); log("docid=" + doc.get("docid")); log("score=" + hits.score(i)); } searcher.close(); } catch (Exception ex) { log("EXTYPE: " + ex.getClass().getName()); log("EXMSG: " + ex.getMessage()); try { PrintWriter mout = new PrintWriter(new FileOutputStream("err.dat"), true); ex.printStackTrace(mout); } catch(FileNotFoundException newex) { log("TERRIBLE: " + newex.getMessage()); System.exit(0); } } } static Query simpleQuery(Analyzer analyzer) throws Exception { Query q1 = QueryParser.parse("iepeditorial", "all", analyzer); return q1; } } ################################################## --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
