You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2016/10/19 21:36:58 UTC

[jira] [Commented] (SOLR-9665) Facet Values Sort Order: Add 3rd choice: Alpha-Numeric Sort

    [ https://issues.apache.org/jira/browse/SOLR-9665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15589941#comment-15589941 ] 

Shawn Heisey commented on SOLR-9665:
------------------------------------

How do you propose deciding between numeric and alpha sorting?  Although Solr does have explicitly numeric field types, I don't know whether the information about field type is available to the facet code.  Also, numbers might be stored in a string field rather than a numeric field, and if the field type makes the decision, those would sort incorrectly.  I think the only logical solution is separate sort options for numeric and alpha, so the admin can decide at query time.  I don't think it would work right if there was only one additional option.

I'm sure that the current sort is just a simple Java sort function, unaware of different character sets, capitalization, etc. For best support along the lines you have mentioned, I think it might need to be fully aware of Unicode.

I'm not trying to discourage the idea, just clarify what's actually needed to implement it.

> Facet Values Sort Order: Add 3rd choice: Alpha-Numeric Sort
> -----------------------------------------------------------
>
>                 Key: SOLR-9665
>                 URL: https://issues.apache.org/jira/browse/SOLR-9665
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: faceting
>            Reporter: Luke P Warwick
>
> As a person, I need facet values to be in predictable, intuitive spots so that I can quickly and easily find the values that are appropriate to me.
> Problem Statement: Today Solr has two default facet sort orders, neither of which provides predicatable, intuitive facet value orders for people.  
> Goal: Address two areas where index sorts facet values how a computer would rather than how a human would.  Both are really problematic for very common E-commerce facets like size and brand.
> 1. Numbers need to be sorted from lowest to highest.
> Currently Index sorts facets 1,11,14,2,21,3,30...
> Numbers should be sorted 1,2,3,11,14,21,30 and so on
> 2. Capitalization should NOT impact sort order.
> currently index sorts facets that start with lower case below all facets that start with upper case.  Many brands (for reasons unknown to me) start their brand name with a lower case letter (while I would like to punish these brands for this foolishness, I don't want to punish the innocent customers of these brands).
> Example: 
> Today: Marmot,Patagonia,Smith,Zoot,majola,prAna
> Desired: majola,Marmot,Patagonia,prAna,Smith,Zoot



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org