lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From King JKing <beuk...@gmail.com>
Subject Lucene index
Date Wed, 29 Dec 2010 08:51:41 GMT
Dear all,

I use Lucene to index document content 6 field (int) and 1 file (string)

I log the index process. Log said that,

 INFO [CONTENT-FILTER INDEX-TIMER] 2010-12-29 15:45:52,707 Index 55 item in
10576 miliseconds
 INFO [CONTENT-FILTER INDEX-TIMER] 2010-12-29 15:46:13,378 Index 19 item in
20670 miliseconds
 INFO [CONTENT-FILTER INDEX-TIMER] 2010-12-29 15:46:28,391 Index 35 item in
15013 miliseconds

Why Lucene take much time for just index small amount of document?

Could you give me the best performance of Lucence and How to improve
performance?

Here is my code
Document doc = new Document();
                doc.add(new Field("system_id", data.systemId + "",
                        Field.Store.YES, Index.NOT_ANALYZED));
                doc.add(new Field("app_id", data.appId + "",
Field.Store.YES,
                        Index.NOT_ANALYZED));
                doc.add(new Field("object_id", data.objectId + "",
                        Field.Store.YES, Index.NOT_ANALYZED));
                doc.add(new Field("content_id", data.contentId + "",
                        Field.Store.YES, Index.NOT_ANALYZED));
                doc.add(new Field("owner_id", data.ownerId + "",
                        Field.Store.YES, Index.NOT_ANALYZED));
                doc.add(new Field("to_user_id", data.toUserId + "",
                        Field.Store.YES, Index.NOT_ANALYZED));
                doc.add(new Field("parent_id", data.parentId + "",
                        Field.Store.YES, Index.NOT_ANALYZED));
                doc.add(new Field("content", data.content + "",
                        Field.Store.YES, Index.ANALYZED));
                doc.add(new Field("id", System.nanoTime() + "",
                        Field.Store.YES, Index.NOT_ANALYZED));
                iWriter.addDocument(doc);

Thank a lot for suppot.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message