Class EdgeIndexSimilarity
- java.lang.Object
-
- org.apache.lucene.search.similarities.Similarity
-
- org.apache.lucene.search.similarities.TFIDFSimilarity
-
- org.apache.lucene.search.similarities.DefaultSimilarity
-
- com.atlassian.confluence.internal.index.lucene.EdgeIndexSimilarity
-
public class EdgeIndexSimilarity extends org.apache.lucene.search.similarities.DefaultSimilarity
Similarity class for edge index- Since:
- 7.17
-
-
Constructor Summary
Constructors Constructor Description EdgeIndexSimilarity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
coord(int overlap, int maxOverlap)
All fields in edge index only contain a single value.float
idf(long docFreq, long numDocs)
float
queryNorm(float sumOfSquaredWeights)
float
tf(float freq)
-
Methods inherited from class org.apache.lucene.search.similarities.DefaultSimilarity
decodeNormValue, encodeNormValue, getDiscountOverlaps, lengthNorm, scorePayload, setDiscountOverlaps, sloppyFreq, toString
-
-
-
-
Method Detail
-
coord
public float coord(int overlap, int maxOverlap)
All fields in edge index only contain a single value. It is therefore not possible for a single field to match multiple query terms (unless they are all the same). Hence, we can disregard the maxOverlap parameter.- Overrides:
coord
in classorg.apache.lucene.search.similarities.DefaultSimilarity
-
tf
public float tf(float freq)
- Overrides:
tf
in classorg.apache.lucene.search.similarities.DefaultSimilarity
-
idf
public float idf(long docFreq, long numDocs)
- Overrides:
idf
in classorg.apache.lucene.search.similarities.DefaultSimilarity
-
queryNorm
public float queryNorm(float sumOfSquaredWeights)
- Overrides:
queryNorm
in classorg.apache.lucene.search.similarities.DefaultSimilarity
-
-