fixed typo

This commit is contained in:
Martijn van Groningen 2019-09-11 09:52:09 +02:00
parent ef33a99e6e
commit 8a48ef2a06
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ final class EnrichProcessorFactory implements Processor.Factory, Consumer<Cluste
String targetField = ConfigurationUtils.readStringProperty(TYPE, tag, config, "target_field");
int maxMatches = ConfigurationUtils.readIntProperty(TYPE, tag, config, "max_matches", 1);
if (maxMatches < 1 || maxMatches > 128) {
throw ConfigurationUtils.newConfigurationException(TYPE, tag, "max_matches", "should be between 1 and 1024");
throw ConfigurationUtils.newConfigurationException(TYPE, tag, "max_matches", "should be between 1 and 128");
}
switch (policyType) {

View File

@ -211,7 +211,7 @@ public class EnrichProcessorFactoryTests extends ESTestCase {
config.put("max_matches", randomBoolean() ? between(-2048, 0) : between(129, 2048));
Exception e = expectThrows(ElasticsearchParseException.class, () -> factory.create(Collections.emptyMap(), "_tag", config));
assertThat(e.getMessage(), equalTo("[max_matches] should be between 1 and 1024"));
assertThat(e.getMessage(), equalTo("[max_matches] should be between 1 and 128"));
}
static MetaData createMetaData(String name, EnrichPolicy policy) throws IOException {