Return-Path: X-Original-To: apmail-lucenenet-user-archive@www.apache.org Delivered-To: apmail-lucenenet-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D435C105F7 for ; Tue, 27 Jan 2015 09:19:25 +0000 (UTC) Received: (qmail 34043 invoked by uid 500); 27 Jan 2015 09:19:26 -0000 Delivered-To: apmail-lucenenet-user-archive@lucenenet.apache.org Received: (qmail 34000 invoked by uid 500); 27 Jan 2015 09:19:26 -0000 Mailing-List: contact user-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@lucenenet.apache.org Delivered-To: mailing list user@lucenenet.apache.org Received: (qmail 33984 invoked by uid 99); 27 Jan 2015 09:19:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jan 2015 09:19:25 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of prvs=462f2afea=Brad.Allan@fiserv.com designates 204.95.150.32 as permitted sender) Received: from [204.95.150.32] (HELO mail1.checkfree.com) (204.95.150.32) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jan 2015 09:19:20 +0000 X-IronPort-AV: E=Sophos;i="5.09,473,1418101200"; d="scan'208";a="69921946" Received: from iwpdlpem02.corp.checkfree.com (HELO JWPKEXHT02.corp.checkfree.com) ([10.132.91.26]) by iapiron02.corp.checkfree.com with ESMTP; 27 Jan 2015 04:16:57 -0500 Received: from JWPKEXMBX03.corp.checkfree.com ([169.254.5.18]) by JWPKEXHT02.corp.checkfree.com ([10.141.82.34]) with mapi id 14.03.0195.001; Tue, 27 Jan 2015 04:16:57 -0500 From: "Allan, Brad (Bracknell)" To: "user@lucenenet.apache.org" Subject: RE: multiple values in a field Thread-Topic: multiple values in a field Thread-Index: AdA5tf2ag8cj9i/YRsmd3QHfbSEilgAW7G0A Date: Tue, 27 Jan 2015 09:16:57 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.25.66.39] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: True X-Virus-Checked: Checked by ClamAV on apache.org Would you perhaps be better off creating multiple documents? Doc 1 ordernumber =3D 1 product =3D apple quantity=3D100 Doc 2 ordernumber =3D 1 product =3D banana quantity=3D2000 Doc 3 ordernumber =3D 1 product =3D carrot quantity=3D35 Then a search could be done 'where order number =3D 1' and you have no worr= ies about correlated arrays. -----Original Message----- From: Lingam, ChandraMohan J [mailto:chandramohan.j.lingam@intel.com] Sent: 26 January 2015 22:18 To: user@lucenenet.apache.org Subject: multiple values in a field Let's say I have three fields in a document: ordernumber, product, quantity= . For every ordernumber, I can have several products and corresponding quanti= ty. ordernumber =3D 1 product =3D ['apple','banana','carrot'] quantity=3D[100,2000,35] Would Lucene preserve the order in which values are added to a field within= a document? i.e. apple will be first value, banana will be second and so = forth? In my tests, order is preserved and I am able to retrieve values back from = a document in the same order I added values to it. But wanted to confirm i= f this is a guaranteed behavior. Thx Chandra ________________________________ CheckFree Solutions Limited (trading as Fiserv) Registered Office: Eversheds House, 70 Great Bridgewater Street, Manchester= , M15 ES Registered in England: No. 2694333