That's perfect -- I'm interested in the stored field case. Thanks! ----- On May 26, 2016, at 3:46 AM, Adrien Grand <jpou...@gmail.com> wrote:
> It depends which Lucene API you are talking to. For the inverted index, the > order should be irrelevant. For doc values, Lucene will return values in > sorted order per document. Finally stored fields will return values in the > same order as they have been added to the Document at index-time (we do not > guarantee this across different field names, but for values that are > associated with the same field name, I think this is fine to assume). > Le mer. 25 mai 2016 à 22:00, Daniel Bigham <dani...@wolfram.com> a écrit : > > I've recently become aware that Lucene allows duplicate field names, > > which essentially allows multiple values to be associated with a field. > > A follow-up question is whether the order of the values is maintained... > > if I store the values "A", "B", and then "C" in a given field for a > > document, and then I later get the values via: > > IndexableField[] f = doc.getFields(fieldName); > > for (int i = 0; i < f.length; ++i) > > { > > ... > > } > > ... will the values come back in the same order I added them? > > Thanks, > > Daniel > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org