Class DefaultScoreFunctionFactory
- java.lang.Object
-
- com.atlassian.confluence.impl.search.v2.score.DefaultScoreFunctionFactory
-
- All Implemented Interfaces:
ScoreFunctionFactory
public class DefaultScoreFunctionFactory extends Object implements ScoreFunctionFactory
-
-
Field Summary
Fields Modifier and Type Field Description static double
EXP_DECAY
static int
EXP_SCALE_DAYS
static double
GAUSSIAN_DECAY
static int
GAUSSIAN_SCALE_DAYS
-
Constructor Summary
Constructors Constructor Description DefaultScoreFunctionFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ComposableScoreFunction
createContentTypeScoreFunction()
Create a ComposableScoreFunction which boosts content relevancy by their type.ExpDecayFunction
createExpDecayFunction()
Create an ExpDecayFunction which boosts content relevancy by recency of modification.GaussDecayFunction
createGaussianDecayFunction()
Create a GaussDecayFunction which boosts content relevancy by recency of modification.ComposableScoreFunction
createRecencyOfModificationScoreFunction()
See: Desmosfor current implementation and visualisation.static void
setNowTimestampSupplier(com.atlassian.util.concurrent.Supplier<Long> supplier)
-
-
-
Field Detail
-
GAUSSIAN_DECAY
public static final double GAUSSIAN_DECAY
- See Also:
- Constant Field Values
-
GAUSSIAN_SCALE_DAYS
public static final int GAUSSIAN_SCALE_DAYS
- See Also:
- Constant Field Values
-
EXP_DECAY
public static final double EXP_DECAY
- See Also:
- Constant Field Values
-
EXP_SCALE_DAYS
public static final int EXP_SCALE_DAYS
- See Also:
- Constant Field Values
-
-
Method Detail
-
createContentTypeScoreFunction
public ComposableScoreFunction createContentTypeScoreFunction()
Description copied from interface:ScoreFunctionFactory
Create a ComposableScoreFunction which boosts content relevancy by their type. Types may have different boosts, depending on Confluence's implementation.e.g. Pages, and blog posts may be prioritised over other content types like attachments.
- Specified by:
createContentTypeScoreFunction
in interfaceScoreFunctionFactory
-
createRecencyOfModificationScoreFunction
public ComposableScoreFunction createRecencyOfModificationScoreFunction()
See: Desmosfor current implementation and visualisation.- Specified by:
createRecencyOfModificationScoreFunction
in interfaceScoreFunctionFactory
-
setNowTimestampSupplier
public static void setNowTimestampSupplier(com.atlassian.util.concurrent.Supplier<Long> supplier)
-
createGaussianDecayFunction
public GaussDecayFunction createGaussianDecayFunction()
Description copied from interface:ScoreFunctionFactory
Create a GaussDecayFunction which boosts content relevancy by recency of modification. More recently modified content is boosted more than older content, creating a "time decay" affect.Decay effect is based on a gaussian function. Think - gaussian bell-curve distribution.
- Specified by:
createGaussianDecayFunction
in interfaceScoreFunctionFactory
- See Also:
ScoreFunctionFactory.createRecencyOfModificationScoreFunction()
-
createExpDecayFunction
public ExpDecayFunction createExpDecayFunction()
Description copied from interface:ScoreFunctionFactory
Create an ExpDecayFunction which boosts content relevancy by recency of modification. More recently modified content is boosted more than older content, creating a "time decay" affect.Decay effect is based on an exponential function.
- Specified by:
createExpDecayFunction
in interfaceScoreFunctionFactory
- See Also:
ScoreFunctionFactory.createRecencyOfModificationScoreFunction()
-
-