lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allan, Brad (Bracknell)" <>
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

Doc 2
ordernumber = 1
product = banana

Doc 3
ordernumber = 1
product = carrot

Then a search could be done 'where order number = 1' and you have no worries about correlated

-----Original Message-----
From: Lingam, ChandraMohan J []
Sent: 26 January 2015 22:18
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']

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.



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

View raw message