Correctly format arrays in output
There are a few places where arrays are output in messages yet the output would merely use the default toString implementation rather than actually putting the content of the array in the message. This commit fixes the issue. Relates #24340
This commit is contained in:
parent
823cbb437b
commit
64888f6f01
|
@ -33,6 +33,7 @@ import org.elasticsearch.search.aggregations.support.ValuesSource;
|
||||||
import org.elasticsearch.search.internal.SearchContext;
|
import org.elasticsearch.search.internal.SearchContext;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -114,7 +115,7 @@ public class SamplerAggregator extends SingleBucketAggregator {
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("Unknown `execution_hint`: [" + value + "], expected any of " + values());
|
throw new IllegalArgumentException("Unknown `execution_hint`: [" + value + "], expected any of " + Arrays.toString(values()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final ParseField parseField;
|
private final ParseField parseField;
|
||||||
|
|
|
@ -53,6 +53,7 @@ import org.elasticsearch.search.aggregations.support.ValuesSourceConfig;
|
||||||
import org.elasticsearch.search.internal.SearchContext;
|
import org.elasticsearch.search.internal.SearchContext;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -327,7 +328,7 @@ public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFac
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("Unknown `execution_hint`: [" + value + "], expected any of " + values());
|
throw new IllegalArgumentException("Unknown `execution_hint`: [" + value + "], expected any of " + Arrays.toString(values()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final ParseField parseField;
|
private final ParseField parseField;
|
||||||
|
|
|
@ -41,6 +41,7 @@ import org.elasticsearch.search.aggregations.support.ValuesSourceConfig;
|
||||||
import org.elasticsearch.search.internal.SearchContext;
|
import org.elasticsearch.search.internal.SearchContext;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -359,7 +360,7 @@ public class TermsAggregatorFactory extends ValuesSourceAggregatorFactory<Values
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("Unknown `execution_hint`: [" + value + "], expected any of " + values());
|
throw new IllegalArgumentException("Unknown `execution_hint`: [" + value + "], expected any of " + Arrays.toString(values()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final ParseField parseField;
|
private final ParseField parseField;
|
||||||
|
|
Loading…
Reference in New Issue