diff --git a/core/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java b/core/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java index 09411b56e25..4404cdafecc 100644 --- a/core/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java +++ b/core/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java @@ -62,7 +62,7 @@ public class FieldStatsRequest extends BroadcastRequest { public void setIndexConstraints(IndexConstraint[] indexConstraints) { if (indexConstraints == null) { - throw new NullPointerException("specified index_contraints can't be null"); + throw new NullPointerException("specified index_constraints can't be null"); } this.indexConstraints = indexConstraints; } diff --git a/core/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java b/core/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java index 5e2a560a945..bda0a24c9a4 100644 --- a/core/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java +++ b/core/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java @@ -366,7 +366,7 @@ public class IndexShardRoutingTable implements Iterable { } } if (ordered.isEmpty()) { - throw new IllegalArgumentException("No data node with critera [" + nodeAttribute + "] found"); + throw new IllegalArgumentException("No data node with criteria [" + nodeAttribute + "] found"); } return new PlainShardIterator(shardId, ordered); } diff --git a/core/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java b/core/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java index c1a5f3ff208..4f2f9d06097 100644 --- a/core/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java +++ b/core/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java @@ -458,7 +458,7 @@ public class RoutingNodes implements Iterable { */ public void started(ShardRouting shard) { ensureMutable(); - assert !shard.active() : "expected an intializing shard " + shard; + assert !shard.active() : "expected an initializing shard " + shard; if (shard.relocatingNodeId() == null) { // if this is not a target shard for relocation, we need to update statistics inactiveShardCount--; diff --git a/core/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java b/core/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java index e12020cfa74..cd75f897719 100644 --- a/core/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java +++ b/core/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java @@ -715,7 +715,7 @@ public class BalancedShardsAllocator extends AbstractComponent implements Shards } } if (logger.isTraceEnabled()) { - logger.trace("No eligable node found to assign shard [{}] decision [{}]", shard, decision.type()); + logger.trace("No eligible node found to assign shard [{}] decision [{}]", shard, decision.type()); } } else if (logger.isTraceEnabled()) { logger.trace("No Node found to assign shard [{}]", shard); diff --git a/core/src/main/java/org/elasticsearch/index/IndexModule.java b/core/src/main/java/org/elasticsearch/index/IndexModule.java index f9eb3ec2b54..eabc0951e7f 100644 --- a/core/src/main/java/org/elasticsearch/index/IndexModule.java +++ b/core/src/main/java/org/elasticsearch/index/IndexModule.java @@ -154,7 +154,7 @@ public final class IndexModule { */ public void addIndexStore(String type, BiFunction provider) { if (storeTypes.containsKey(type)) { - throw new IllegalArgumentException("key [" + type +"] already registerd"); + throw new IllegalArgumentException("key [" + type +"] already registered"); } storeTypes.put(type, provider); } diff --git a/core/src/main/java/org/elasticsearch/index/analysis/CommonGramsTokenFilterFactory.java b/core/src/main/java/org/elasticsearch/index/analysis/CommonGramsTokenFilterFactory.java index 1843fb58e56..0225ec64559 100644 --- a/core/src/main/java/org/elasticsearch/index/analysis/CommonGramsTokenFilterFactory.java +++ b/core/src/main/java/org/elasticsearch/index/analysis/CommonGramsTokenFilterFactory.java @@ -45,7 +45,7 @@ public class CommonGramsTokenFilterFactory extends AbstractTokenFilterFactory { this.words = Analysis.parseCommonWords(env, settings, null, ignoreCase); if (this.words == null) { - throw new IllegalArgumentException("mising or empty [common_words] or [common_words_path] configuration for common_grams token filter"); + throw new IllegalArgumentException("missing or empty [common_words] or [common_words_path] configuration for common_grams token filter"); } } diff --git a/core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java index de5d4172630..033f668eada 100644 --- a/core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java @@ -178,7 +178,7 @@ public class MultiMatchQueryBuilder extends AbstractQueryBuilder(); diff --git a/core/src/main/java/org/elasticsearch/index/translog/BaseTranslogReader.java b/core/src/main/java/org/elasticsearch/index/translog/BaseTranslogReader.java index c98ea69f87f..4cdbb28a68e 100644 --- a/core/src/main/java/org/elasticsearch/index/translog/BaseTranslogReader.java +++ b/core/src/main/java/org/elasticsearch/index/translog/BaseTranslogReader.java @@ -38,7 +38,7 @@ public abstract class BaseTranslogReader implements Comparable> orderedPipelineAggregators, List> unmarkedBuilders, Set> temporarilyMarked, PipelineAggregatorBuilder builder) { if (temporarilyMarked.contains(builder)) { - throw new IllegalArgumentException("Cyclical dependancy found with pipeline aggregator [" + builder.getName() + "]"); + throw new IllegalArgumentException("Cyclical dependency found with pipeline aggregator [" + builder.getName() + "]"); } else if (unmarkedBuilders.contains(builder)) { temporarilyMarked.add(builder); String[] bucketsPaths = builder.getBucketsPaths(); diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTermsAggregatorFactory.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTermsAggregatorFactory.java index 5ed1f953e5f..ccaa3738651 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTermsAggregatorFactory.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTermsAggregatorFactory.java @@ -228,7 +228,7 @@ public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFac metaData); } - throw new AggregationExecutionException("sigfnificant_terms aggregation cannot be applied to field [" + throw new AggregationExecutionException("significant_terms aggregation cannot be applied to field [" + config.fieldContext().field() + "]. It can only be applied to numeric or string fields."); } diff --git a/core/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java b/core/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java index 66fb8aa3f21..30552201dfd 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java +++ b/core/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java @@ -150,9 +150,9 @@ public class BulkRequestTests extends ESTestCase { BulkRequest bulkRequest = new BulkRequest(); try { bulkRequest.add(bulkAction.getBytes(StandardCharsets.UTF_8), 0, bulkAction.length(), null, null); - fail("should have thrown an exception about the unknown paramater _foo"); + fail("should have thrown an exception about the unknown parameter _foo"); } catch (IllegalArgumentException e) { - assertThat("message contains error about the unknown paramater _foo: " + e.getMessage(), + assertThat("message contains error about the unknown parameter _foo: " + e.getMessage(), e.getMessage().contains("Action/metadata line [3] contains an unknown parameter [_foo]"), equalTo(true)); } } diff --git a/core/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java b/core/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java index 1f98275aee7..1c61292d87c 100644 --- a/core/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java @@ -674,7 +674,7 @@ public class IndexNameExpressionResolverTests extends ESTestCase { } else { try { indexNameExpressionResolver.concreteIndices(context, "Foo*"); - fail("expecting exeption when result empty and allowNoIndicec=false"); + fail("expecting exception when result empty and allowNoIndicec=false"); } catch (IndexNotFoundException e) { // expected exception } diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java index d37aee16a11..b5ce103aeed 100644 --- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java @@ -713,7 +713,7 @@ public class ClusterRebalanceRoutingTests extends ESAllocationTestCase { assertThat(routingTable.index("test1").shard(i).primaryShard().state(), equalTo(INITIALIZING)); } - logger.debug("now start initializing shards and expect exactly one rebalance from node1 to node 2 sicne index [test] is all on node1"); + logger.debug("now start initializing shards and expect exactly one rebalance from node1 to node 2 since index [test] is all on node1"); routingNodes = clusterState.getRoutingNodes(); routingTable = strategy.applyStartedShards(clusterState, routingNodes.shardsWithState("test1", INITIALIZING)).routingTable(); diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java index df0c4a8fa3e..a4cd47bd24b 100644 --- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java @@ -181,7 +181,7 @@ public class RebalanceAfterActiveTests extends ESAllocationTestCase { } - logger.info("complete relocation, thats it!"); + logger.info("complete relocation, that's it!"); routingNodes = clusterState.getRoutingNodes(); prevRoutingTable = routingTable; routingTable = strategy.applyStartedShards(clusterState, routingNodes.shardsWithState(INITIALIZING)).routingTable(); diff --git a/core/src/test/java/org/elasticsearch/discovery/zen/publish/PendingClusterStatesQueueTests.java b/core/src/test/java/org/elasticsearch/discovery/zen/publish/PendingClusterStatesQueueTests.java index dfaf407f850..72f258e5fca 100644 --- a/core/src/test/java/org/elasticsearch/discovery/zen/publish/PendingClusterStatesQueueTests.java +++ b/core/src/test/java/org/elasticsearch/discovery/zen/publish/PendingClusterStatesQueueTests.java @@ -112,7 +112,7 @@ public class PendingClusterStatesQueueTests extends ESTestCase { for (ClusterStateContext context : queue.pendingStates) { final String pendingMaster = context.state.nodes().masterNodeId(); assertThat("found a cluster state from [" + pendingMaster - + "], after a state from [" + processedMaster + "] was proccessed", + + "], after a state from [" + processedMaster + "] was processed", pendingMaster, equalTo(processedMaster)); } // and check all committed contexts from another master were failed diff --git a/core/src/test/java/org/elasticsearch/index/mapper/date/SimpleDateMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/date/SimpleDateMappingTests.java index b6a7dee23ba..140fa11c810 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/date/SimpleDateMappingTests.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/date/SimpleDateMappingTests.java @@ -156,7 +156,7 @@ public class SimpleDateMappingTests extends ESSingleNodeTestCase { .startObject() .field("date_field_en", "Wed, 06 Dec 2000 02:55:00 -0800") .field("date_field_de", "Mi, 06 Dez 2000 02:55:00 -0800") - .field("date_field_default", "Wed, 06 Dec 2000 02:55:00 -0800") // check default - no exception is a successs! + .field("date_field_default", "Wed, 06 Dec 2000 02:55:00 -0800") // check default - no exception is a success! .endObject() .bytes()); assertNumericTokensEqual(doc, defaultMapper, "date_field_en", "date_field_de"); diff --git a/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java b/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java index 9fe8995e65f..8881624c206 100644 --- a/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java +++ b/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java @@ -525,7 +525,7 @@ public class SimpleIndexTemplateIT extends ESIntegTestCase { try { createIndex("test"); - fail("index creation should have failed due to alias with existing index name in mathching index template"); + fail("index creation should have failed due to alias with existing index name in matching index template"); } catch(InvalidAliasNameException e) { assertThat(e.getMessage(), equalTo("Invalid alias name [index], an index exists with the same name as the alias")); } diff --git a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java index a8d06d39f59..ef408d16784 100644 --- a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java +++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java @@ -83,7 +83,7 @@ public class NettyTransportIT extends ESIntegTestCase { assertThat(clusterIndexHealths.getStatus(), is(ClusterHealthStatus.GREEN)); try { transportClient.filterWithHeader(Collections.singletonMap("ERROR", "MY MESSAGE")).admin().cluster().prepareHealth().get(); - fail("Expected exception, but didnt happen"); + fail("Expected exception, but didn't happen"); } catch (ElasticsearchException e) { assertThat(e.getMessage(), containsString("MY MESSAGE")); assertThat(channelProfileName, is(TransportSettings.DEFAULT_PROFILE));