/** Collapse the hash table & sort in-place. */
public int[] sortPostings() {
compactPostings();
final int[] postingsHash = this.postingsHash;
new SorterTemplate() {
@Override
protected void swap(int i, int j) {
final int o = postingsHash[i];
postingsHash[i] = postingsHash[j];
postingsHash[j] = o;