File tree Expand file tree Collapse file tree
lib/segment/src/index/query_optimization/rescore_formula Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,15 +164,15 @@ impl ParsedExpression {
164164 let scale = scale. unwrap_or ( DEFAULT_DECAY_SCALE ) ;
165165
166166 if midpoint <= 0.0 || midpoint >= 1.0 {
167- return Err ( OperationError :: validation_error (
168- "Decay midpoint should be between 0.0 and 1.0, not inclusive." ,
169- ) ) ;
167+ return Err ( OperationError :: validation_error ( format ! (
168+ "Decay midpoint should be between 0.0 and 1.0 (exclusive), got {midpoint}."
169+ ) ) ) ;
170170 }
171171
172172 if scale <= 0.0 {
173- return Err ( OperationError :: validation_error (
174- "Decay scale should be non-zero positive." ,
175- ) ) ;
173+ return Err ( OperationError :: validation_error ( format ! (
174+ "Decay scale should be non-zero positive, got {scale}."
175+ ) ) ) ;
176176 }
177177
178178 let lambda = match kind {
You can’t perform that action at this time.
0 commit comments