blevesearch/bleve — pull request #129 by Shugyousha (2014-11-29 15:58:26+00:00)
Title: Replace list usage with slice and sort.Sort

The first commit is just a clean up for which I did not want to open an extra pull request.

In the termfacet refactoring I replaced the list usage with a slice and sort.Sort call. The usage of sort.Sort has some performance implication since it may take quite a long time to sort the TermFacet slice. Additionally, since I am subslicing it, the underlying TermFacet array (which may be big) will not be garbage collected until the TermFacetResult is not used anymore. I assume its memory will be freed after the next query has been run though.

If you think that the performance cost is acceptable, simplifying the code the way I did makes sense (though some benchmarking results would be really nice to have).