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 BE0E017A35 for ; Tue, 27 Jan 2015 15:19:33 +0000 (UTC) Received: (qmail 96156 invoked by uid 500); 27 Jan 2015 15:19:34 -0000 Delivered-To: apmail-lucenenet-user-archive@lucenenet.apache.org Received: (qmail 96124 invoked by uid 500); 27 Jan 2015 15:19:34 -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 96113 invoked by uid 99); 27 Jan 2015 15:19:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jan 2015 15:19:33 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sisve@devhost.se designates 195.74.38.225 as permitted sender) Received: from [195.74.38.225] (HELO bin-vsp-out-04.atm.binero.net) (195.74.38.225) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jan 2015 15:19:06 +0000 X-Halon-ID: 9e365123-a637-11e4-9ec3-005056917c0c Authorized-sender: sisve@devhost.se Received: from Nefarian.local (unknown [212.85.89.43]) by bin-vsp-out-04.atm.binero.net (Halon Mail Gateway) with ESMTPSA for ; Tue, 27 Jan 2015 16:17:33 +0100 (CET) Message-ID: <54C7AC0D.1080703@devhost.se> Date: Tue, 27 Jan 2015 16:17:33 +0100 From: Simon Svensson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: user@lucenenet.apache.org Subject: Re: multiple values in a field References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Your test data of ['apple','banana','carrot'] is already sorted. You'll never know if you get them in the original order, or alphabetical order. Could you show your code that creates the Document? On 26/01/15 23:18, Lingam, ChandraMohan J wrote: > Let's say I have three fields in a document: ordernumber, product, quantity. > > For every ordernumber, I can have several products and corresponding quantity. > > ordernumber = 1 > product = ['apple','banana','carrot'] > quantity=[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 if this is a guaranteed behavior. > > Thx > Chandra > > > > >