lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Svensson <si...@devhost.se>
Subject Re: multiple values in a field
Date Tue, 27 Jan 2015 15:17:33 GMT

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
>
>
>
>
>


Mime
View raw message