Merge pull request #11909 from martijnvg/nested_query_min_score_mode
Added `min` score mode.
This commit is contained in:
commit
c9f21a7ecc
|
@ -87,6 +87,8 @@ public class NestedQueryParser implements QueryParser {
|
||||||
String sScoreMode = parser.text();
|
String sScoreMode = parser.text();
|
||||||
if ("avg".equals(sScoreMode)) {
|
if ("avg".equals(sScoreMode)) {
|
||||||
scoreMode = ScoreMode.Avg;
|
scoreMode = ScoreMode.Avg;
|
||||||
|
} else if ("min".equals(sScoreMode)) {
|
||||||
|
scoreMode = ScoreMode.Min;
|
||||||
} else if ("max".equals(sScoreMode)) {
|
} else if ("max".equals(sScoreMode)) {
|
||||||
scoreMode = ScoreMode.Max;
|
scoreMode = ScoreMode.Max;
|
||||||
} else if ("total".equals(sScoreMode) || "sum".equals(sScoreMode)) {
|
} else if ("total".equals(sScoreMode) || "sum".equals(sScoreMode)) {
|
||||||
|
|
|
@ -52,8 +52,8 @@ fields referenced inside the query must use the complete path (fully
|
||||||
qualified).
|
qualified).
|
||||||
|
|
||||||
The `score_mode` allows to set how inner children matching affects
|
The `score_mode` allows to set how inner children matching affects
|
||||||
scoring of parent. It defaults to `avg`, but can be `sum`, `max` and
|
scoring of parent. It defaults to `avg`, but can be `sum`, `min`,
|
||||||
`none`.
|
`max` and `none`.
|
||||||
|
|
||||||
Multi level nesting is automatically supported, and detected, resulting
|
Multi level nesting is automatically supported, and detected, resulting
|
||||||
in an inner nested query to automatically match the relevant nesting
|
in an inner nested query to automatically match the relevant nesting
|
||||||
|
|
Loading…
Reference in New Issue