Skip to content

Commit

Permalink
Address @colings86's comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpountz committed May 12, 2015
1 parent f6fa955 commit 8698a26
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public <VS extends ValuesSource> VS valuesSource(ValuesSourceConfig<VS> config,
throw new SearchParseException(searchContext, "Can't deal with unmapped ValuesSource type " + config.valueSourceType, null);
}
} else {
vs = valuesSourceWithMissingValues(config);
vs = originalValuesSource(config);
}

if (config.missing == null) {
Expand Down Expand Up @@ -128,7 +128,10 @@ public <VS extends ValuesSource> VS valuesSource(ValuesSourceConfig<VS> config,
}
}

private <VS extends ValuesSource> VS valuesSourceWithMissingValues(ValuesSourceConfig<VS> config) throws IOException {
/**
* Return the original values source, before we apply `missing`.
*/
private <VS extends ValuesSource> VS originalValuesSource(ValuesSourceConfig<VS> config) throws IOException {
if (config.fieldContext == null) {
if (ValuesSource.Numeric.class.isAssignableFrom(config.valueSourceType)) {
return (VS) numericScript(config);
Expand Down

0 comments on commit 8698a26

Please sign in to comment.