I think this should go in the ref guide. If your product depends on this behaviour, you want reassurance that it isn't going to change in the next release. Not everyone will go looking through the javadoc to see if this is implied.
Typically it'll either be something like "are always returned in insertion order" or "are currently returned in insertion order, but your code shouldn't rely on this behaviour because it can change in future releases". That's usually sufficient to make an informed decision on how to handle returned values. If it's different for docValues, that's even more reason to state it clearly in the ref guide to avoid confusion. Best, Thomas Op do 2 jul. 2020 om 20:37 schreef Erick Erickson <erickerick...@gmail.com>: > This is true _unless_ you fetch from docValues. docValues are SORTED_SETs, > so the results will be both ordered and deduplicated if you return them > as part of the field list. > > Don’t really think it needs to go into the ref guide, it’s just inherent > in storing > any kind of value. You wouldn’t expect multiple text entries in a > multiValued > field to be rearranged when returning the stored values either. > > Best, > Erick > > > On Jul 2, 2020, at 2:21 PM, Vincenzo D'Amore <v.dam...@gmail.com> wrote: > > > > Thanks, and genuinely asking: is there written somewhere in the > > documentation too? If no, could anyone suggest to me which doc page > should > > I try to update? > > > > On Thu, Jul 2, 2020 at 8:08 PM Colvin Cowie <colvin.cowie....@gmail.com> > > wrote: > > > >> The order of values within a multivalued field should match the > insertion > >> order. -- we certainly rely on that in our product. > >> > >> Order is guaranteed to be maintained for values in a multi-valued field. > >>> > >> > >> > https://lucene.472066.n3.nabble.com/order-question-on-solr-multi-value-field-tp4027695p4028057.html > >> > >> On Thu, 2 Jul 2020 at 18:52, Vincenzo D'Amore <v.dam...@gmail.com> > wrote: > >> > >>> Hi all, > >>> > >>> simple question: Solr float/double multivalue fields preserve the order > >> of > >>> inserted values? > >>> > >>> Best regards, > >>> Vincenzo > >>> > >>> -- > >>> Vincenzo D'Amore > >>> > >> > > > > > > -- > > Vincenzo D'Amore > >