@Override
public float computeNorm(String fieldName, FieldInvertState state) {
return state.getBoost() * (discountOverlaps ? state.getLength() - state.getNumOverlap() : state.getLength());
}
};
FieldNormModifier fnm = new FieldNormModifier(store, s);
fnm.reSetNorms("field");
// new norm (with default similarity) should put longer docs first
searcher = new IndexSearcher(store, false);
searcher.search(new TermQuery(new Term("field", "word")), new Collector() {
private int docBase = 0;