Help to Implement New Similarity Function

Hello - I am trying to implement a new similarity function .
Here is the formula :
f(q,d)=1/ |d| log2(clicksd+1) ∑ TF log2(N+1/ DFt+1)
t∈q t,d

After looking at the link https://github.com/stefansavev/elasticsearch-custom-similarity-example/blob/master/src/main/java/stefansavev/esplugins/OverlapSimilarity.java.

Here is the initial declaration:
protected float score(BasicStats stats, float tf, float docLen, long docValue)

I then wrote this piece and here is where I need help. The error that I get when I compile are all pointing to stats.getdocLen . The error says "cannot find symbol" right after stats. at the period position. The error re-occurs for the remaining stats.xxxx declarations - a total of 5.

float score = (float) (1/stats.getdocLen()) * ((Math.log(stats.getdocValue()+1))/Math.log(2)) * stats.gettf * ((Math.log(stats.getnumberofDocments()+1)/(stats.getdocFreq()+1))/ Math.log(2));

Any help is much appreciated...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.