Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 14448 invoked from network); 16 May 2005 20:50:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 May 2005 20:50:09 -0000 Received: (qmail 46136 invoked by uid 500); 16 May 2005 16:15:06 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 46093 invoked by uid 500); 16 May 2005 16:15:05 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 46048 invoked by uid 99); 16 May 2005 16:15:05 -0000 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=FORGED_RCVD_HELO,FROM_HAS_MIXED_NUMS,SPF_HELO_PASS,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of blizzy-keyword-lucene_dev.6564c8@blizzy.de designates 217.160.200.68 as permitted sender) Received: from iceman.iq-computing.de (HELO iceman.iq-computing.de) (217.160.200.68) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 16 May 2005 09:15:01 -0700 Received: (qmail 24212 invoked from network); 16 May 2005 18:08:47 +0200 Received: from c229224.adsl.hansenet.de (HELO wolverine.hh.iq-computing.de) (mickey@213.39.229.224) by iceman.iq-computing.de with AES256-SHA encrypted SMTP; 16 May 2005 18:08:47 +0200 Received: (qmail 4502 invoked from network); 16 May 2005 18:11:24 +0200 Received: from localhost (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 16 May 2005 18:11:23 +0200 Message-ID: <4288C62B.200@blizzy.de> Date: Mon, 16 May 2005 18:11:23 +0200 From: Maik Schreiber User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050325) X-Accept-Language: en-us, en MIME-Version: 1.0 To: java-dev@lucene.apache.org Subject: Contribution: LuceneIndexAccessor X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, My company would like to make the following contribution to Lucene (in sandbox?) licensed under the Apache License, Version 2.0. Background: While doing project work on a web-based search engine we have developed a component called LuceneIndexAccessor. This component provides a high-level index access interface, that is, it synchronizes read/write access to a Lucene index. You no longer need to worry about concurrently opening readers/writers/searchers. The component also does caching where applicable. Further, it makes sure that all Searchers get closed whenever you have added a document to the index. You can download the source here: http://www.blizzy.de/lucene/lucene-indexaccess-0.1.0.zip Using LuceneIndexAccessor is incredibly simple: Directory directory = ... Analyzer analyzer = ... // somewhere near program start IIndexAccessProvider accessProvider = new IndexAccessProvider(directory, analyzer); ILuceneIndexAccessor accessor = new LuceneIndexAccessor(accessProvider); accessor.open(); IndexWriter writer = null; try { writer = accessor.getWriter(); // use writer... } catch (IOException e) { // ... } finally { accessor.release(write); } // somewhere near program exit accessor.close(); (Opening IndexReaders or Searchers follows the same use pattern.) Right now, the source compiles against a CVS version of Lucene. Also, it uses Log4J for logging. We're happy with changing that if need arises. -- Maik Schreiber * http://www.blizzy.de GPG public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1F11D713 Key fingerprint: CF19 AFCE 6E3D 5443 9599 18B5 5640 1F11 D713 --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org