Hi,
I would like to override default similarity's computeNorm to work with
a different field, other than the query field.
Here is the DefaultSimilarity implementation:
@Override
public float computeNorm(String field, FieldInvertState state) {
final int numTerms;
if (discountOverlaps)
numTerms = state.getLength() - state.getNumOverlap();
else
numTerms = state.getLength();
return state.getBoost() * ((float) (1.0 / Math.sqrt(numTerms)));
}
any ideas how to do that?
Thanks,
Tsvika
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]