lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allan, Brad (Bracknell)" <Brad.Al...@Fiserv.com>
Subject RE: multiple values in a field
Date Tue, 27 Jan 2015 09:16:57 GMT
Would you perhaps be better off creating multiple documents?

Doc 1
ordernumber = 1
product = apple
quantity=100

Doc 2
ordernumber = 1
product = banana
quantity=2000

Doc 3
ordernumber = 1
product = carrot
quantity=35

Then a search could be done 'where order number = 1' and you have no worries 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 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





________________________________

CheckFree Solutions Limited (trading as Fiserv)
Registered Office: Eversheds House, 70 Great Bridgewater Street, Manchester, M15 ES
Registered in England: No. 2694333

Mime
View raw message