Are you showing the facets with &facet parameters in your request?
Then you can ask for the facets to be returned sorted by byte-order with facet.sort=index.
Got nothing to do with your schema, let alone your DIH import configuration that you showed us. Just a matter of how you ask Solr for facets.
Byte order is not neccesarily exactly 'alphabetical' order, if your facets are not 7-bit-ascii and/or if they contain punctuation. If your facet values are just 7-bit ascii characters and spaces, it should basically be alphabetical order.
But that's all that Solr offers, as far as I know. On 1/20/2011 12:34 PM, PeterKerk wrote:
I want to provide a list of facets to my visitors order alphabetically, for example, for the 'features' facet I have: data-config.xml: <entity name="location_feature" query="select featureid from location_features where locationid='${location.id}'"> <entity name="feature" query="select title from features where id = '${location_feature.featureid}' ORDER BY title ASC"> <field name="features" column="title" /> </entity> </entity> schema.xml: <field name="features" type="textTight" indexed="true" stored="true" multiValued="true"/> <field name="features_raw" type="string" indexed="true" stored="true" multiValued="true"/> <copyField source="features" dest="features_raw"/> But this doesnt give me the facets in an alphabetical order. Besides the features facet, I also have some other facets that ALSO need to be shown in alphabetical order. How to approach this?