@@ -58,23 +58,16 @@ export class FunctionScoreQuery extends QueryBase {
58
58
score_mode ?: FunctionScoreMode
59
59
}
60
60
61
- export class ScoreFunctionBase {
62
- filter ?: QueryContainer
63
- weight ?: double
64
- }
65
-
66
- export class WeightScoreFunction extends ScoreFunctionBase { }
67
-
68
- export class ScriptScoreFunction extends ScoreFunctionBase {
61
+ export class ScriptScoreFunction {
69
62
script : Script
70
63
}
71
64
72
- export class RandomScoreFunction extends ScoreFunctionBase {
65
+ export class RandomScoreFunction {
73
66
field ?: Field
74
67
seed ?: long | string
75
68
}
76
69
77
- export class FieldValueFactorScoreFunction extends ScoreFunctionBase {
70
+ export class FieldValueFactorScoreFunction {
78
71
field : Field
79
72
factor ?: double
80
73
missing ?: double
@@ -88,7 +81,7 @@ export class DecayPlacement<TOrigin, TScale> {
88
81
origin ?: TOrigin
89
82
}
90
83
91
- export class DecayFunctionBase extends ScoreFunctionBase {
84
+ export class DecayFunctionBase {
92
85
multi_value_mode ?: MultiValueMode
93
86
}
94
87
@@ -113,7 +106,8 @@ export type DecayFunction =
113
106
114
107
/** @variants container */
115
108
// This container is valid without a variant. Also, despite being documented as a function, 'weight' is actually a
116
- // container property that can be combined with a function. From SearchModule#registerScoreFunctions in ES:
109
+ // container property that can be combined with a function.
110
+ // From SearchModule#registerScoreFunctions in ES:
117
111
// Weight doesn't have its own parser, so every function supports it out of the box. Can be a single function too when
118
112
// not associated to any other function, which is why it needs to be registered manually here.
119
113
export class FunctionScoreContainer {
0 commit comments