Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 76326 invoked from network); 2 Mar 2004 22:08:26 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Mar 2004 22:08:26 -0000 Received: (qmail 96872 invoked by uid 500); 2 Mar 2004 22:08:08 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 96848 invoked by uid 500); 2 Mar 2004 22:08:08 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 96833 invoked from network); 2 Mar 2004 22:08:08 -0000 Received: from unknown (HELO mail.infoworks.at) (213.129.255.146) by daedalus.apache.org with SMTP; 2 Mar 2004 22:08:08 -0000 Received: from infoworks.at (mister2.infoworks.at [192.168.1.2]) by mail.infoworks.at (Postfix) with ESMTP id 2E8BA7AA2 for ; Tue, 2 Mar 2004 23:08:14 +0100 (MET) Message-ID: <404505CE.5060706@infoworks.at> Date: Tue, 02 Mar 2004 23:08:14 +0100 From: Michael Steiger User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lucene Users List Subject: Re: Best Practices for indexing in Web application References: <20040301120703.86665.qmail@web12701.mail.yahoo.com> In-Reply-To: <20040301120703.86665.qmail@web12701.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Otis Gospodnetic wrote: > --- Michael Steiger wrote: > >>Hello Lucene Users, >>I have a web application using Oracle as the database and I want to >>add >>fulltext query capablities. My idea was to extend the existing >>insert, >>update and delete methods of my backend classes to add, delete/add >>and >>delete respectively. >> >>I'm new to Lucene and after a bit of googling and reading I found a >>few >>issues which I do not know how to resolve in the moment. >> >>1. Concurrency of IndexWriter and IndexReader >>It seems that it is not allowed to open an IndexWriter and an >>IndexReader at the same time. But if one user is changing records in >>the >>database (and therefore changing documents in the Lucene index) and >>another user is querying the index, I would need to open them both. > > > This problem should be easily solvable through synchronizing on an > object that is used as a shared lock. Misunderstanding solved due another response. Should be no problem anymore. >>2. Optimizing the index >>This is maybe related to my first issue. >>I assume that while optimizing the index no queries are allowed. How >>often should the index be optimized? > > > Queries are allowed while an index is being optimized. > You can optimize as often as you'd like, but the recommended approach > is to optimize only when you know your index won't change for a while, > or if you are running out of file descriptors. > > This is covered in at least one of the Lucene articles (links on the > site). Otis, thanks for your help Michael --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org