documentcloud / visualsearch

A Rich Search Box for Real Data
http://documentcloud.github.io/visualsearch/
MIT License
1.8k stars 225 forks source link

Facets are sorting alphabetically by default #163

Closed tusharncuelogic closed 6 years ago

tusharncuelogic commented 7 years ago

How to disable default sorting for facetMatches.

stranger26 commented 6 years ago

Refer to #24 if you want to change the source or you can use

facetMatches: function(callback) {
   var facets; //array of facets
   callback(facets, {
     preserveOrder: true
   });
}
tusharncuelogic commented 6 years ago

@stranger26 It is working. Thanks.