Hoss, I think the use case being asked about is specifically doing a facet.sort though, for cases where you actually do want to sort facet values with facet.sort, not sort records -- while still presenting the facet values with original case, but sorting them case insensitively.

The solutions offered at those URLs don't address this.

Because I'm pretty sure there isn't really any good solution for this, Solr just won't do that, just how it goes.

On 12/21/2010 2:33 PM, Chris Hostetter wrote:
: I am trying to do a facet search and sort the facet values too.
        ...
: Then I followed the sample example schema.xml, created a copyField of type
        ...
:               <fieldType name="alphaOnlySort" class="solr.TextField"
: sortMissingLast="true" omitNorms="true">
        ...
: But the sorted facet values dont have their case preserved anymore.
:
: How can I get around this?

Did you look at how/why/when alphaOnlySort is used in the example?

The FAQ entry you refered to address almost the exact same scnerio with
wanting to search/sort on the same data...

http://wiki.apache.org/solr/FAQ#Why_Isn.27t_Sorting_Working_on_my_Text_Fields.3F

"...the simplest thing to do is to use copyField to index a second version
of your field using the StrField class."


So have one version of your field using StrField that you facet on, and
copyField that to another version (using TextField and
KeywordTokenizer) that you sort on.



-Hoss

Reply via email to