Return-Path: Delivered-To: apmail-lucene-general-archive@www.apache.org Received: (qmail 82525 invoked from network); 29 Sep 2005 07:46:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Sep 2005 07:46:04 -0000 Received: (qmail 96124 invoked by uid 500); 29 Sep 2005 07:46:03 -0000 Delivered-To: apmail-lucene-general-archive@lucene.apache.org Received: (qmail 96090 invoked by uid 500); 29 Sep 2005 07:46:02 -0000 Mailing-List: contact general-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@lucene.apache.org Delivered-To: mailing list general@lucene.apache.org Received: (qmail 96075 invoked by uid 99); 29 Sep 2005 07:46:01 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2005 00:46:01 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=HTML_00_10,HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of fidde.andersson@gmail.com designates 66.249.82.200 as permitted sender) Received: from [66.249.82.200] (HELO xproxy.gmail.com) (66.249.82.200) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2005 00:46:08 -0700 Received: by xproxy.gmail.com with SMTP id s19so170964wxc for ; Thu, 29 Sep 2005 00:45:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=nAHU0vASOVCxSq1aNvc0IMhnL97Uj9XK1UshmwxLbYguZRZb2Kshjy/Ng/4ZDvw5OS4Zm4XrE5Umjp2Hq3dcBVd3Dnp6OOZk6qQTvAWwt83tqKLMaOlLpavEgM9kX9RWfU1USPXM1YicF3D2+c4g93wSCOGaOJl6cqszxJVEfYM= Received: by 10.70.118.17 with SMTP id q17mr48693wxc; Thu, 29 Sep 2005 00:45:40 -0700 (PDT) Received: by 10.70.104.3 with HTTP; Thu, 29 Sep 2005 00:45:40 -0700 (PDT) Message-ID: Date: Thu, 29 Sep 2005 09:45:40 +0200 From: Fredrik Andersson Reply-To: Fredrik Andersson To: general@lucene.apache.org Subject: Reading back binary fields MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1814_19110431.1127979940121" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_1814_19110431.1127979940121 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hey Gang! I'm having some problems when modifying an existing index, adding a binary field to each document. Or more specifically, I have a problem reading back that field. I'm using the IndexModifier from the trunk, and I am positive that the binary field gets written down, since the field name shows up in i= n Luke. The index modification is nothing out of the ordinary. ----------------- int i =3D some integer Document doc =3D indexReader.document(i); indexModifier.delete(i); Field tvField =3D new Field(TV_FIELD_NAME,aByteArray,Field.Store.YES); doc.add(tvField); indexModifer.addDocument(doc); indexModifier.optimize(); indexModifier.close(); ----------------- However, when I re-read that document at a later point in time, and iterate the doc.fields() enumeration, the TV_FIELD_NAME field does not show up. Luk= e shows that field, though - what's the trick? On a side-note, I have modified the IndexModifier to use write/delete buffers, so that when some defined buffer size overflows, the buffers flushes down their stuff to the internal indexReader and indexWriter in delete-write order. It increased the speed tremendously compared to the old IndexModifier, which doesn't use any form of internal buffering. If this is something you want comitted to the Lucene trunk, give me a shout and I'll clean it up. Thanks, Fredrik ------=_Part_1814_19110431.1127979940121--