Return-Path: X-Original-To: apmail-lucene-lucene-net-user-archive@www.apache.org Delivered-To: apmail-lucene-lucene-net-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 522F69D00 for ; Fri, 20 Apr 2012 13:02:02 +0000 (UTC) Received: (qmail 32852 invoked by uid 500); 20 Apr 2012 13:02:02 -0000 Delivered-To: apmail-lucene-lucene-net-user-archive@lucene.apache.org Received: (qmail 32813 invoked by uid 500); 20 Apr 2012 13:02:02 -0000 Mailing-List: contact lucene-net-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-user@lucene.apache.org Delivered-To: mailing list lucene-net-user@lucene.apache.org Received: (qmail 32804 invoked by uid 99); 20 Apr 2012 13:02:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Apr 2012 13:02:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anders@lybecker.com designates 209.85.210.53 as permitted sender) Received: from [209.85.210.53] (HELO mail-pz0-f53.google.com) (209.85.210.53) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Apr 2012 13:01:57 +0000 Received: by dajr28 with SMTP id r28so11942354daj.12 for ; Fri, 20 Apr 2012 06:01:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=1abRRIjcciHnUMFprtIZK7x1tTR2fHLQBldE+t4QK/8=; b=GTF7oMX6Ns1OaZaDpsq93S4UHQECOLxHfydwRB3ijdUFhSp0kIV2woaaWYEPb5FSaC z2wDOn4oN7RTvFEBZPm9od1NUyoyLrqyL5kh/f1KGg+lS+Z4HORDKXEA4foIHYH34cH5 7ri0UIj0mmOoeCghELjcFKNl7TTE8NcCZ6R3ZtoQrJoAek2TSb6fFXvqtxPc9biT/e6W 4CjS/NAHxLbyPHTLWVvgJ2kYroYnGH60y6QbEZmnL/OnEyJAK48PM1a5RzG8m3YNPpgI DZ6qt2JG5VpXlW0nRX+5y21qU+xbUAOn+AAuV8QEzHQAgfo/gfv87qK3d9KUN1EWqDqS iU/A== MIME-Version: 1.0 Received: by 10.68.131.101 with SMTP id ol5mr373227pbb.54.1334926896854; Fri, 20 Apr 2012 06:01:36 -0700 (PDT) Received: by 10.68.226.167 with HTTP; Fri, 20 Apr 2012 06:01:36 -0700 (PDT) In-Reply-To: References: Date: Fri, 20 Apr 2012 15:01:36 +0200 Message-ID: Subject: Re: Writing to an Online Index From: Anders Lybecker To: lucene-net-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7b15a4817cf57004be1be36d X-Gm-Message-State: ALoCoQn0kMm4s+vRY2itZXcO+zvX3Pdd2EsqDBFHvswo5XJfAvPSV4azg1a8WyqewrPZ634oxZTE X-Virus-Checked: Checked by ClamAV on apache.org --047d7b15a4817cf57004be1be36d Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Gustavo, There is no problem reading and writing to the index at the same time =96 Lucene handles it for you. Just make sure that you only use one IndexWriter at the time. The IndexSearcher reads a snapshot of the index (based on segments), so you need to reopen the index (IndexReader.ReOpen) to make the new document visible to the IndexSearcher. Regards, Anders Lybecker On Fri, Apr 20, 2012 at 2:54 PM, Gustavo Poll wrote: > Greetings friends! I need help from you, Lucene.net experts, please! > > First, sorry for the bad english... > > In the next month, my team and I will publish on the Internet our search > site, that uses Lucene.net to search over our internal documents. If you > wanna take a look, here it is the link to the under development site (the= re > might be bugs and the web server is slow): > > http://satdesen.sef.sc.gov.br/tax.NET/Sat.Pesef.Web/Publicacao/Pesquisar.= aspx#top > > The documents indexed are a sort of daily journal. So, on a daily basis, = a > new document will be indexed. And my question to you experts is about thi= s > index update! New documents will be writen using IndexWriter while the > index is been used by the site users, via IndexSearch. What kind of > problem, if any, I'll face in this scenario? May the IndexWriter fail > because a search is been done simultaneously? How Lucene handles this > concurrent access (writing and searching)? > > PS: in the search code, a new IndexSearch instance is created at every > search (may I continue like this or it is kind of mandatory a singleton > IndexSearch?) > > > Thanx you all by the attention! > Any doubts about my explanation, please tell me... > > Gustavo Poll > Software Developer > --047d7b15a4817cf57004be1be36d--