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 F34748E22 for ; Thu, 1 Sep 2011 08:31:06 +0000 (UTC) Received: (qmail 25291 invoked by uid 500); 1 Sep 2011 08:31:06 -0000 Delivered-To: apmail-lucene-lucene-net-user-archive@lucene.apache.org Received: (qmail 24349 invoked by uid 500); 1 Sep 2011 08:30:50 -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 24229 invoked by uid 99); 1 Sep 2011 08:30:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 08:30:45 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of robban.p@gmail.com designates 209.85.214.48 as permitted sender) Received: from [209.85.214.48] (HELO mail-bw0-f48.google.com) (209.85.214.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 08:30:37 +0000 Received: by bkat2 with SMTP id t2so2291687bka.35 for ; Thu, 01 Sep 2011 01:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=OL7IOh892qzpK3VH4YO2CU01uF1w91VS+IZ2k+nrpio=; b=eeOPARW6A1Fk6hsZfQ0R4tCtnIcdmL9fks9VcRibPWuJ0QKgPR4+QlGS6ymbjwZpRZ JG7jKizx+VaUp+UgTpNo8HjFfCbw6ZIQ1dK1BFeFAlYUDNwrhunOkBgfFhpC0zW2G5Al XoHTwDvaFPXJGWznamlxH53rUWlhmC/mBk8II= Received: by 10.204.140.145 with SMTP id i17mr840020bku.395.1314865817065; Thu, 01 Sep 2011 01:30:17 -0700 (PDT) Received: from Roberts-MacBook-Pro.local (c-082ee555.020-169-73746f10.cust.bredbandsbolaget.se [85.229.46.8]) by mx.google.com with ESMTPS id n11sm107128bkd.47.2011.09.01.01.30.15 (version=SSLv3 cipher=OTHER); Thu, 01 Sep 2011 01:30:15 -0700 (PDT) Message-ID: <4E5F4296.4000909@gmail.com> Date: Thu, 01 Sep 2011 10:30:14 +0200 From: Robert Pohl User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: lucene-net-user@lucene.apache.org References: <004e01cc61b2$bcba7130$362f5390$@com> <005601cc61b6$15acf3a0$4106dae0$@com> <005e01cc61bd$3e6f3350$bb4d99f0$@com> <004501cc6299$2ec78dd0$8c56a970$@com> <001e01cc634e$0f5d66 80$2e183380$@com> <001a01cc64e5$b689e300$239da900$@com> <002a01cc655d$ef360300$cda20900$@com> In-Reply-To: <002a01cc655d$ef360300$cda20900$@com> Content-Type: multipart/alternative; boundary="------------080808070208060109050607" X-Virus-Checked: Checked by ClamAV on apache.org Subject: [Lucene.Net] Locked File while adding doc to writer --------------080808070208060109050607 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Suddenly i cannot add doc to the index (Lucene.Net 2.0.0.4), i get this exception: "{"Cannot rename C:\\work\\Bokborgen\\Bokborgen\\Index_tmp\\deleteable.new to C:\\work\\Bokborgen\\Bokborgen\\Index_tmp\\deletable"}" Inner exception: "{"The process cannot access the file 'C:\\work\\Bokborgen\\Bokborgen\\Index_tmp\\deleteable.new' because it is being used by another process."}" From my Google'ing this seems like a Windows locking problem. I turned of system indexing in win, but it didn't help. Do you guys know of a workaround? My Code: IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), true); ... var doc = new Document(); doc.Add(new Lucene.Net.Documents.Field("Id", p.Id.ToString(), Field.Store.YES, Field.Index.UN_TOKENIZED)); doc.Add(new Field("ISBN", p.ExternalId, Field.Store.YES, Field.Index.TOKENIZED)); doc.Add(new Field("Title", p.ProductName, Field.Store.YES, Field.Index.TOKENIZED)); doc.Add(new Field("Category", catName, Field.Store.YES, Field.Index.TOKENIZED)); doc.Add(new Field("Contributors", p.GetContributors(false), Field.Store.YES, Field.Index.TOKENIZED)); doc.Add(new Field("BookType", p.BookType(), Field.Store.YES, Field.Index.UN_TOKENIZED)); doc.Add(new Field("Description", p.DescriptionLong, Field.Store.YES, Field.Index.TOKENIZED)); writer.AddDocument(doc); <-- error is here after a while Thanks, Robert --------------080808070208060109050607--