Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@apache.org Received: (qmail 24454 invoked from network); 3 May 2002 16:57:09 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 3 May 2002 16:57:09 -0000 Received: (qmail 1108 invoked by uid 97); 3 May 2002 16:57:11 -0000 Delivered-To: qmlist-jakarta-archive-lucene-dev@nagoya.betaversion.org Received: (qmail 1044 invoked by alias); 3 May 2002 16:57:10 -0000 Delivered-To: jakarta-archive-lucene-dev@jakarta.apache.org Received: (qmail 986 invoked by uid 97); 3 May 2002 16:57:10 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 911 invoked by uid 98); 3 May 2002 16:57:09 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) From: =?iso-8859-1?Q?Martin_S=E9vigny?= To: Subject: org.apache.lucene.document.Document.getFields(String name) method? Date: Fri, 3 May 2002 18:58:56 +0200 Message-ID: <000001c1f2c3$cfec7810$6a7ba8c0@ROUSSEAU> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, The method org.apache.lucene.document.Document.getField(String name) is documented as this : "Returns a field with the given name if any exist in this document, or null. If multiple fields may exist with this name, this method returns the last added such added." I'm wondering why the limit for multiple fields. In some cases, I'm interested in retrieving all the values for a field. Looking at the code, I see that it returns a field as soon as it finds one with the right name : ----- for (DocumentFieldList list =3D fieldList; list !=3D null; list =3D list.next) if (list.field.name().equals(name)) return list.field; ----- Would it be possible to add something like a "public Field[] getFields(String name)" method to the Document class? It is pretty simple to write, I can send the code if needed. Thank's, Martin S=E9vigny -- To unsubscribe, e-mail: For additional commands, e-mail: