hi ,
   Sorry to interrupt you, but I am really confused by the bad performance
of lucene 4.2.1. Recently  I migrated project from lucene 3.0 to 4.2.1 .
After simply tests I found that both indexing and reading performance of
lucene 4 can not match the older version.

Indexing code snippets are as follow:

      IndexWriterConfig iwc=new IndexWriterConfig(Version.LUCENE_42,
                new StandardAnalyzer(Version.LUCENE_42));
      IndexWriter   iw = new IndexWriter(NIOFSDirectory.open(file),iwc);

      for(){
            document.add(filed);
             iw.addDocument(document);
      }
      iw.close();



Reading code snippets as follow:


for(i=0;i<maxDoc;++i){
   Document doc=indexsearcher.doc(i);
   for(j){
        print(doc.get(column[j]));
   }
}


Plain text file is about 720MB , contains 6M records. Index File is 1.5GB
in lucene3 and 1.1GB in lucene 4.2.1.
When indexing , lucene 4 costs about two times time than lucene 3. and
lucene 4 costs  five times time than lucene3 when reading.
After that I made another test, which is using lucene 4 reading index file
indexed by lucene 3, and result is it is slower than lucene 3 reading index
file indexed by lucene 3 , but faster than lucene 4 reading index file
created by lucene 4 .

Is that lucene 4 use more complex compression algorithm which makes smaller
index file, but slow down the indexing and reading performance ? How to
improve the this.
Thanks for your time.
Looking forward to your reply.

Chris Zhang From Beijing,China

Reply via email to