Fair enough, but what's "first value in the list"?
There's nothing special about "mutliValued" fields,
that is where the schema has "multiValued=true".
under the covers, this is no different than just
concatenating all the values together and putting them
in at one go, except for some games with the
position between one term and another
(positionIncrementGap). Part of my confusion is
that the term multi-valued is sometimes used to
refer to "multiValued=true" and sometimes used
to refer to documents with more than one
*token* in a particular field (often as the result
of the analysis chain)

The second case seems to be more in the
grouping/field collapsing arena, although
that doesn't work on fields with more than one
value yet either. But that seems a more sensible
place to put the second case rather than
overloading sorting.

I guess my take on the issue is that sorting has a
pretty specific meaning, and that rather than
overload sorting I'd rather see if the use-cases
are best served by another mechanism.


Best
Erick

On Sat, Aug 13, 2011 at 12:39 PM, Michael Lackhoff <mich...@lackhoff.de> wrote:
> On 13.08.2011 18:03 Erick Erickson wrote:
>
>> The problem I've always had is that I don't quite know what
>> "sorting on multivalued fields" means. If your field had tokens
>> aaaaa and zzzzz, would sorting on that field put the doc
>> at the beginning or end of the list? Sure, you can define
>> rules (first token, last token, average of all tokens (whatever
>> that means)), but each solution would be wrong sometime,
>> somewhere, and/or completely useless.
>
> Of course it would need rules but I think it wouldn't be too hard to
> find rules that are at least far better than the current situation.
>
> My wish would include an option that decides if the field can be used
> just once or every value on its own. If the option is set to FALSE, only
> the first value would be used, if it is TRUE, every value of the field
> would get its place in the result list.
>
> so, if we have e.g.
> record1: ccc and bbb
> record2: aaa and zzz
> it would be either
> record2 (aaa)
> record1 (ccc)
> or
> record2 (aaa)
> record1 (bbb)
> record1 (ccc)
> record2 (zzz)
>
> I find these two outcomes most plausible so I would allow them if
> technical possible but whatever rule looks more plausible to the
> experts: some solution is better than no solution.
>
> -Michael
>

Reply via email to