Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 96986 invoked from network); 6 Nov 2008 19:46:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2008 19:46:43 -0000 Received: (qmail 39327 invoked by uid 500); 6 Nov 2008 19:46:42 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 39298 invoked by uid 500); 6 Nov 2008 19:46:42 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 39286 invoked by uid 99); 6 Nov 2008 19:46:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Nov 2008 11:46:42 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.233.170.186] (HELO rn-out-0910.google.com) (64.233.170.186) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Nov 2008 19:45:24 +0000 Received: by rn-out-0910.google.com with SMTP id j71so637223rne.4 for ; Thu, 06 Nov 2008 11:45:55 -0800 (PST) Received: by 10.151.107.8 with SMTP id j8mr1964863ybm.119.1226000755122; Thu, 06 Nov 2008 11:45:55 -0800 (PST) Received: from ?10.17.4.4? (pool-96-237-252-30.bstnma.fios.verizon.net [96.237.252.30]) by mx.google.com with ESMTPS id i27sm3467239elf.4.2008.11.06.11.45.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 Nov 2008 11:45:54 -0800 (PST) Message-Id: From: Michael McCandless To: java-user@lucene.apache.org In-Reply-To: <5e76f3840811060909t6f172bb1r4b4d59f57579d29b@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: "Global" Field question (thread-safe)? Date: Thu, 6 Nov 2008 14:45:52 -0500 References: <5e76f3840811060909t6f172bb1r4b4d59f57579d29b@mail.gmail.com> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org The field never changes across all docs? If so, this will work fine. Mike Glen Newton wrote: > I have a use case where I want all of my documents to have - in > addition to their other fields - a single field=value. > An example use is where I have multiple Lucene indexes that I search > in parallel, but still need to distinguish them. > Index 1: All documents have: source="a1" > Index 2: All documents have: source="a2" > > This is a common use case that has previously been discussed on this > list. > > The particular question I have is: when I am indexing, can I create a > single Field and use it for all Documents? Note I am in a > multithreaded environment, so many Documents are created and will have > this same Field added to them, and subsequently indexed. > > So are their any threading issues with this particular usage? > > thanks, > > Glen > > -- > > - > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org