Return-Path: Delivered-To: apmail-lucene-lucene-net-user-archive@www.apache.org Received: (qmail 15771 invoked from network); 24 Jan 2011 18:32:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2011 18:32:27 -0000 Received: (qmail 67482 invoked by uid 500); 24 Jan 2011 18:32:27 -0000 Delivered-To: apmail-lucene-lucene-net-user-archive@lucene.apache.org Received: (qmail 67282 invoked by uid 500); 24 Jan 2011 18:32:25 -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 67271 invoked by uid 99); 24 Jan 2011 18:32:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 18:32:25 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=MSGID_MULTIPLE_AT,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [67.210.126.130] (HELO scorpio.lunarpages.com) (67.210.126.130) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 18:32:17 +0000 Received: from [76.74.8.106] (helo=FrankYu64) by scorpio.lunarpages.com with esmtp (Exim 4.69) (envelope-from ) id 1PhRCI-0002zN-8g for lucene-net-user@lucene.apache.org; Mon, 24 Jan 2011 10:31:26 -0800 From: "Frank Yu" To: References: <00cf01cbb8f6$485b7510$d9125f30$@yu@farpoint.com> <135731.38588.qm@web33401.mail.mud.yahoo.com> <00bb01cbbbf0$691bb600$3b532200$@yu@farpoint.com> <352124E8BA61544F8C92497D3F6D8CD6221C4C@JAGUAR.moonvalley.net> In-Reply-To: <352124E8BA61544F8C92497D3F6D8CD6221C4C@JAGUAR.moonvalley.net> Subject: RE: Thread Contention in Lucene.Net 2.9 Date: Mon, 24 Jan 2011 11:35:01 -0700 Message-ID: <00d901cbbbf5$69e7ed60$3db7c820$@yu@farpoint.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acu5hqhEof5jBLDuSr2Oz6jXkpbJtACZ/LRAAADy/TAAAHQFgA== Content-Language: en-us X-ACL-Warn: { X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - scorpio.lunarpages.com X-AntiAbuse: Original Domain - lucene.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - farpoint.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org Chris, When the IndexSearcher gets created, it is read only: IndexSearcher recordSearcher = new IndexSearcher(IndexMemory, true); Later in the code, the IndexSearcher may get re-opened. My understanding is that the IndexSearcher should be still read only even if it gets re-opened, right? IndexReader oldReader = recordSearcher.GetIndexReader(); if (!oldReader.IsCurrent()) { IndexReader newReader = oldReader.Reopen(); if (oldReader!= newReader) { recordSearcher = new IndexSearcher(newReader); } } Thanks, Frank -----Original Message----- From: Chris Woolum [mailto:cwoolum@moonvalley.com] Sent: Monday, January 24, 2011 11:14 AM To: lucene-net-user@lucene.apache.org Subject: RE: Thread Contention in Lucene.Net 2.9 Hey Frank, Lucene does not use locks for the index reader. When you initialize the index, are you loading it in as read only? Chris