Erick Erickson wrote:
> In general, the behavior when sorting is not predictable when
> sorting on a tokenized field, which "text" is. What would
> it mean to sort on a field with "erick" "Moazzam" as tokens
> in a single document? Should it be in the "e"s or the "m"s?

Might it be possible or reasonable to have it show up under
both "e" and "m"?  Or if not, just at the first one it finds?

I've recently been asked a similar question where we wanted
to sort documents by a victim's age.  I have a victim_age
field, but since there can be multiple victims in an incident
it wasn't a unique field.   As a workaround, I added a
"victim_age_min" field; but it would have been easier if
I didn't need to do that.

> That said, you probably want to watch out for case....
> 
> Best
> Erick
> 
> On Fri, Oct 22, 2010 at 10:02 AM, Moazzam Khan <moazz...@gmail.com> wrote:
> 
>> For anyone who faced the same problem, changing the field to string
>> from text worked!
>>
>> -Moazzam
>>
>> On Fri, Oct 22, 2010 at 8:50 AM, Moazzam Khan <moazz...@gmail.com> wrote:
>>> The field type of the first name and last name is text. Could that be
>>> why it's not sorting properly? I just changed it to string and started
>>> a full-import. Hopefully that will work.
>>>
>>> Thanks,
>>> Moazzam
>>>
>>> On Thu, Oct 21, 2010 at 7:42 PM, Jayendra Patil
>>> <jayendra.patil....@gmail.com> wrote:
>>>> need additional information .....
>>>> Sorting is easy in Solr just by passing the sort parameter
>>>>
>>>> However, when it comes to text sorting it depends on how you analyse
>>>> and tokenize your fields
>>>> Sorting does not work on fields with multiple tokens.
>>>>
>> http://wiki.apache.org/solr/FAQ#Why_Isn.27t_Sorting_Working_on_my_Text_Fields.3F
>>>> On Thu, Oct 21, 2010 at 7:24 PM, Moazzam Khan <moazz...@gmail.com>
>> wrote:
>>>>> Hey guys,
>>>>>
>>>>> I have a list of people indexed in Solr. I am trying to sort by their
>>>>> first names but I keep getting results that are not alphabetically
>>>>> sorted (I see the names starting with W before the names starting with
>>>>> A). I have a feeling that the results are first being sorted by
>>>>> relevancy then sorted by first name.
>>>>>
>>>>> Is there a way I can get the results to be sorted alphabetically?
>>>>>
>>>>> Thanks,
>>>>> Moazzam
>>>>>
> 

Reply via email to