java: public float docScore(int docId, String field, int numPayloadsSeen, float payloadScore) {return numPayloadsSeen > 0 ? (payloadScore / numPayloadsSeen) : 1;}
C#: public override float DocScore(int docId, string field, int numPayloadsSeen, float payloadScore){return numPayloadsSeen > 0 ? (payloadScore / numPayloadsSeen) : 1;}