Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 1963 invoked from network); 15 Oct 2010 01:43:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Oct 2010 01:43:06 -0000 Received: (qmail 51218 invoked by uid 500); 15 Oct 2010 01:43:04 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 51137 invoked by uid 500); 15 Oct 2010 01:43:04 -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 51129 invoked by uid 99); 15 Oct 2010 01:43:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 01:43:04 +0000 X-ASF-Spam-Status: No, hits=4.7 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robin.bygrave@gmail.com designates 209.85.213.48 as permitted sender) Received: from [209.85.213.48] (HELO mail-yw0-f48.google.com) (209.85.213.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 01:42:59 +0000 Received: by ywi4 with SMTP id 4so168089ywi.35 for ; Thu, 14 Oct 2010 18:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=ak+R+8C2/1shL0Ano/LA+uOJPKlrJ+F4hM8n1j4hIIU=; b=CGDdiuZyutgz+3FrABeWrlSMbhJU9wlNN4suNadxOidnnREiO3qr32QOZFAH8pnVkl uRgotL+1FN0XlXHBweGL2D9aHEfmgGe7C3UJ6aqDXMd7STofMLy/kiFT7bndk8O7izSq /zQYLm4wrUhB4UI5z6m1TCFO2ft32BCJ8z6XI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=F74t0R/buJBON95spGJrO6shVorSj/kVJxSR4Q0bz7nid+0UTD+4pt+hDHqJYPm++A Z4lA3LkVeSvuFgsiaCA4XYqclheUQV+rU3YttJP36ozeGvyoLemgjktOku8ZmP+Ph5mQ j7lmfcfb+aYdFU4h+RGqeYcMSKiJIW81XBSTk= MIME-Version: 1.0 Received: by 10.101.156.36 with SMTP id i36mr6667571ano.174.1287106958682; Thu, 14 Oct 2010 18:42:38 -0700 (PDT) Received: by 10.100.198.15 with HTTP; Thu, 14 Oct 2010 18:42:38 -0700 (PDT) In-Reply-To: References: Date: Fri, 15 Oct 2010 14:42:38 +1300 Message-ID: Subject: Re: ParallelReader From: Rob Bygrave To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016e68dea3d0f69cb04929df194 --0016e68dea3d0f69cb04929df194 Content-Type: text/plain; charset=ISO-8859-1 >> Any case where it would break? If a query uses multiple fields it would break. That is, usually all the fields need to be in doc in index 2 - not just the modified one. On Fri, Oct 15, 2010 at 2:35 PM, Erick Erickson wrote: > This seems like far too much work if I'm reading things right. You can't > update > a field, but you #can# update a document which actually re-index that > document > under the covers (you have to have a way to uniquely identify the doc). > Then, when > you reopen your index reader, you'll only see the new value for the one > field that's > different. This doesn't rely on any second index at all. > > So is there something I'm missing here that caused you to take the route > you're > taking? Because I'd just try updating the document and reopening the reader > first... > > HTH > Erick > > On Thu, Oct 14, 2010 at 9:06 PM, Nilesh Vijaywargiay < > nilesh.vijay@gmail.com > > wrote: > > > Hey Erick, Sure. > > * > > * > > *What I am trying to achieve:* > > > > A) Update a field in Index A > > B) When searching for that old field, it should be a miss. > > > > *How I achieved it* > > > > *Index 1 * > > Doc 1 - Field1, Value 1 > > Doc 2 - Field1, Value 1 > > > > *Index 2* > > Doc 1 - Field1, Modified_Value 1 > > Doc 2 - EMPTY > > > > Add index 2 before Index 1 in the parallel reader. > > In short, I am creating a new index with same number of documents but all > > the documents are empty except the ones I want to update. > > > > *RESULTS:* > > If I search for Field1:Value1, I get a miss[What I wanted] > > If I search for Field1:Modified_Value 1, I get a hit[What I wanted] > > > > *PROBLEM* > > I am kinda finding it surprising that I am able to update a field[I was > > told > > I can't]. Ofcourse there is downside of creating a new index with dummy > > documents which might be huge. But apart from that, Is there something > > fishy > > about it? Any case where it would break? > > > > > > > > On Thu, Oct 14, 2010 at 5:55 PM, Erick Erickson > >wrote: > > > > > No. And you don't even want to try... Document IDs are NOT invariant. > > > Particularly > > > when you delete a document and optimize an index, all the documents > that > > > come > > > after the deleted one get new doc IDs. Trying to keep these two indexes > > in > > > synch > > > will be a nightmare. > > > > > > Perhaps you could explain what you're trying to accomplish and we could > > > suggest > > > other approaches. See: > > > > > > http://people.apache.org/~hossman/#xyproblem > > > > > > Your question appears to be an "XY Problem" ... that is: you are > dealing > > > with "X", you are assuming "Y" will help you, and you are asking about > > "Y" > > > without giving more details about the "X" so that we can understand the > > > full issue. Perhaps the best solution doesn't involve "Y" at all? > > > See Also: http://www.perlmonks.org/index.pl?node_id=542341 > > > > > > Best, > > > Erick > > > > > > On Thu, Oct 14, 2010 at 11:42 AM, Nilesh Vijaywargiay < > > > nilesh.vijay@gmail.com> wrote: > > > > > > > I have two index, A and B. Can two documents doc1[in index A] and > > doc2[in > > > > index B] have a common field? doc1 and doc2 have same document Id's. > > > > > > > > > > --0016e68dea3d0f69cb04929df194--