Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 16612 invoked from network); 23 Apr 2009 20:32:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Apr 2009 20:32:39 -0000 Received: (qmail 83697 invoked by uid 500); 23 Apr 2009 20:32:36 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 83617 invoked by uid 500); 23 Apr 2009 20:32:36 -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 83607 invoked by uid 99); 23 Apr 2009 20:32:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 20:32:36 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [213.199.154.16] (HELO IE1EHSOBE006.bigfish.com) (213.199.154.16) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 20:32:27 +0000 Received: from mail11-dub-R.bigfish.com (10.5.252.3) by IE1EHSOBE006.bigfish.com (10.5.252.26) with Microsoft SMTP Server id 8.1.340.0; Thu, 23 Apr 2009 20:32:03 +0000 Received: from mail11-dub (localhost.localdomain [127.0.0.1]) by mail11-dub-R.bigfish.com (Postfix) with ESMTP id 038DA348084 for ; Thu, 23 Apr 2009 20:32:04 +0000 (UTC) X-BigFish: VPS-23(zz1432R1447R1805Mzz1202hzzz2dh6bh43j62h) X-Spam-TCS-SCL: 1:0 Received: by mail11-dub (MessageSwitch) id 1240518721455932_31268; Thu, 23 Apr 2009 20:32:01 +0000 (UCT) Received: from us-voo-smtp04.internal.sungard.corp (unknown [216.83.166.45]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail11-dub.bigfish.com (Postfix) with ESMTP id 3236B12C804E for ; Thu, 23 Apr 2009 20:32:01 +0000 (UTC) Received: from us-voo-smtp12.internal.sungard.corp ([168.162.128.54]) by us-voo-smtp04.internal.sungard.corp with Microsoft SMTPSVC(6.0.3790.3959); Thu, 23 Apr 2009 16:31:48 -0400 Received: from VOO-EXCHANGE06.internal.sungard.corp ([168.162.128.74]) by us-voo-smtp12.internal.sungard.corp with Microsoft SMTPSVC(6.0.3790.3959); Thu, 23 Apr 2009 16:31:48 -0400 Received: from VOO-EXCHANGE04.internal.sungard.corp ([168.162.128.66]) by VOO-EXCHANGE06.internal.sungard.corp with Microsoft SMTPSVC(6.0.3790.3959); Thu, 23 Apr 2009 16:31:33 -0400 X-MIMEOLE: Produced By Microsoft Exchange V6.5 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: Error: there are more terms than documents... Date: Thu, 23 Apr 2009 16:31:04 -0400 Message-ID: <036829964E44B44F80A0D168BB9849E1018C624B@VOO-EXCHANGE04.internal.sungard.corp> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Error: there are more terms than documents... Thread-Index: AcnETlAO8TAZH58/RMys91dVvLCNLgAARmlg From: To: X-OriginalArrivalTime: 23 Apr 2009 20:31:33.0541 (UTC) FILETIME=[7DE6CD50:01C9C452] X-Virus-Checked: Checked by ClamAV on apache.org Doron, thanks for the reply. > Is it possible that, for at least one document, multiple "objectId" fields > were created? > This would also create this problem. I read that online as well. I don't think so. We do have an update process that updates the index. During the update process we have the call: // create new doc object ... objectId will always be the same as before but // other fields may change Document doc =3D getDocument(s); =20 // replace old doc for objectId w/ new indexWriter.updateDocument(new Term("objectId", s.getObjectId()), doc); However, the getDocument() method is the same method that we use to create a brand new document when building the index from scratch. And I'm sure we only create the "objectId" field once in that method. =20 Unless maybe I'm misunderstanding something about the IndexWriter.updateDocument() method. I thought it would delete all documents that matched the Term passed and add a new one. Unless maybe there is an issue with my Term argument passed to updateDocument and it's really not matching the way I think it is and so we end of with two different documents with the same value in the "objectId" field. Could this situation cause the exception? > The printed document object is the same document object that was created > for indexing. But when a document is read from the index (via IndexReader > API) > it will only contain the stored fields. For instance, assume that at search > time you would like to get the URL of a result document and display it to the user. > For this > you can at indexing time add the URL to a stored field. > > Doron Ah I think I understand. I was printing those docs out as I stored them. That makes total sense now. Thanks for the help. regards, Bill --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org