Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5BCA22009F4 for ; Thu, 26 May 2016 14:47:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5A864160A10; Thu, 26 May 2016 12:47:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A575B160939 for ; Thu, 26 May 2016 14:47:46 +0200 (CEST) Received: (qmail 20297 invoked by uid 500); 26 May 2016 12:47:45 -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 20285 invoked by uid 99); 26 May 2016 12:47:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2016 12:47:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B2A68180530 for ; Thu, 26 May 2016 12:47:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.422 X-Spam-Level: X-Spam-Status: No, score=-0.422 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=wolfram.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id jh4PC_6sLlUA for ; Thu, 26 May 2016 12:47:43 +0000 (UTC) Received: from relay-int.wolfram.com (relay.wolfram.com [140.177.205.37]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id CC6245F642 for ; Thu, 26 May 2016 12:47:42 +0000 (UTC) Received: from wrimail03.wolfram.com (wrimail03.wolfram.com [10.128.1.208]) by relay-int.wolfram.com (Postfix) with ESMTPS id 3BE83D00D7 for ; Thu, 26 May 2016 07:47:42 -0500 (CDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay-int.wolfram.com 3BE83D00D7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfram.com; s=relay; t=1464266862; bh=pLFLfEGASbFEjd+jx4EKNt/QGJx6K/ylYsWonRXeIGk=; h=Date:From:To:In-Reply-To:References:Subject:From; b=lTQfw6m83JufOIQsgaTNolNsx2HGpTCVc8I+jr/yqmQ9kSO3KIZOMXcSf0qGabMTB f31EsKrYsh7Z5Vmpe1Va/oL9jlFThs5C7wzZOOr4Wew/P/0zrydBTKesSzZiprPfyY u48WYvGr1hEPZI/WTiom7Nnj/wFIvW6kMYTSnMtY= Received: from wrimail03.wolfram.com (localhost [127.0.0.1]) by wrimail03.wolfram.com (Postfix) with ESMTPS id 38141484FEAE for ; Thu, 26 May 2016 07:47:42 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by wrimail03.wolfram.com (Postfix) with ESMTP id 2D97F484FEAC for ; Thu, 26 May 2016 07:47:42 -0500 (CDT) Received: from wrimail03.wolfram.com ([127.0.0.1]) by localhost (wrimail03.wolfram.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id OABLHGhpSanv for ; Thu, 26 May 2016 07:47:42 -0500 (CDT) Received: from wrimail03.wolfram.com (wrimail03.wolfram.com [10.128.1.208]) by wrimail03.wolfram.com (Postfix) with ESMTP id 1ECE44800FB4 for ; Thu, 26 May 2016 07:47:42 -0500 (CDT) Date: Thu, 26 May 2016 07:47:42 -0500 (CDT) From: Daniel Bigham To: java-user@lucene.apache.org Message-ID: <1329981225.22020768.1464266862079.JavaMail.zimbra@wolfram.com> In-Reply-To: References: <5745FDF0.9040205@wolfram.com> Subject: Re: Multiple values for a field: Stable order? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22020767_956002723.1464266862079" X-Originating-IP: [10.99.99.38] X-Mailer: Zimbra 8.6.0_GA_1194 (ZimbraWebClient - GC52 (Win)/8.6.0_GA_1194) Thread-Topic: Multiple values for a field: Stable order? Thread-Index: u+VsKd/QYgcgK/hiXwDt1xhuDecD1Q== archived-at: Thu, 26 May 2016 12:47:47 -0000 ------=_Part_22020767_956002723.1464266862079 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable That's perfect -- I'm interested in the stored field case. Thanks!=20 ----- On May 26, 2016, at 3:46 AM, Adrien Grand wrote:= =20 > It depends which Lucene API you are talking to. For the inverted index, t= he > order should be irrelevant. For doc values, Lucene will return values in > sorted order per document. Finally stored fields will return values in th= e > same order as they have been added to the Document at index-time (we do n= ot > guarantee this across different field names, but for values that are > associated with the same field name, I think this is fine to assume). > Le mer. 25 mai 2016 =C3=A0 22:00, Daniel Bigham a = =C3=A9crit : > > I've recently become aware that Lucene allows duplicate field names, > > which essentially allows multiple values to be associated with a field. > > A follow-up question is whether the order of the values is maintained..= . > > if I store the values "A", "B", and then "C" in a given field for a > > document, and then I later get the values via: > > IndexableField[] f =3D doc.getFields(fieldName); > > for (int i =3D 0; i < f.length; ++i) > > { > > ... > > } > > ... will the values come back in the same order I added them? > > Thanks, > > Daniel > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > For additional commands, e-mail: java-user-help@lucene.apache.org ------=_Part_22020767_956002723.1464266862079--