diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 4e512b3cdd418..a44b9c849d333 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -549,22 +549,6 @@ class BuildPlugin implements Plugin { javadoc.classpath = javadoc.getClasspath().filter { f -> return classes.contains(f) == false } - /* - * Force html5 on projects that support it to silence the warning - * that `javadoc` will change its defaults in the future. - * - * But not all of our javadoc is actually valid html5. So we - * have to become valid incrementally. We only set html5 on the - * projects we have converted so that we still get the annoying - * warning on the unconverted ones. That will give us an - * incentive to convert them.... - */ - List html4Projects = [ - ':server', - ] - if (false == html4Projects.contains(project.path)) { - javadoc.options.addBooleanOption('html5', true) - } } configureJavadocJar(project) } diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy index 5aaf54454e137..afbfc747541d7 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy @@ -64,7 +64,7 @@ class ClusterConfiguration { boolean debug = false /** - * Configuration of the setting discovery.zen.minimum_master_nodes on the nodes. + * Configuration of the setting {@code discovery.zen.minimum_master_nodes} on the nodes. * In case of more than one node, this defaults to the number of nodes */ @Input diff --git a/server/src/main/java/org/apache/lucene/queries/ExtendedCommonTermsQuery.java b/server/src/main/java/org/apache/lucene/queries/ExtendedCommonTermsQuery.java index 4580de4cc4a00..c0c6bbb05d81f 100644 --- a/server/src/main/java/org/apache/lucene/queries/ExtendedCommonTermsQuery.java +++ b/server/src/main/java/org/apache/lucene/queries/ExtendedCommonTermsQuery.java @@ -28,7 +28,7 @@ /** * Extended version of {@link CommonTermsQuery} that allows to pass in a - * minimumNumberShouldMatch specification that uses the actual num of high frequent terms + * {@code minimumNumberShouldMatch} specification that uses the actual num of high frequent terms * to calculate the minimum matching terms. */ public class ExtendedCommonTermsQuery extends CommonTermsQuery { diff --git a/server/src/main/java/org/elasticsearch/ElasticsearchException.java b/server/src/main/java/org/elasticsearch/ElasticsearchException.java index 2030960f354c2..89f7aa7cfdb34 100644 --- a/server/src/main/java/org/elasticsearch/ElasticsearchException.java +++ b/server/src/main/java/org/elasticsearch/ElasticsearchException.java @@ -668,7 +668,7 @@ protected String getExceptionName() { } /** - * Returns a underscore case name for the given exception. This method strips Elasticsearch prefixes from exception names. + * Returns a underscore case name for the given exception. This method strips {@code Elasticsearch} prefixes from exception names. */ public static String getExceptionName(Throwable ex) { String simpleName = ex.getClass().getSimpleName(); diff --git a/server/src/main/java/org/elasticsearch/action/ShardOperationFailedException.java b/server/src/main/java/org/elasticsearch/action/ShardOperationFailedException.java index 2eea6d3fb991c..013bf06d2f8b2 100644 --- a/server/src/main/java/org/elasticsearch/action/ShardOperationFailedException.java +++ b/server/src/main/java/org/elasticsearch/action/ShardOperationFailedException.java @@ -31,12 +31,12 @@ public interface ShardOperationFailedException extends Streamable, ToXContent { /** - * The index the operation failed on. Might return null if it can't be derived. + * The index the operation failed on. Might return {@code null} if it can't be derived. */ String index(); /** - * The index the operation failed on. Might return -1 if it can't be derived. + * The index the operation failed on. Might return {@code -1} if it can't be derived. */ int shardId(); diff --git a/server/src/main/java/org/elasticsearch/action/ThreadingModel.java b/server/src/main/java/org/elasticsearch/action/ThreadingModel.java index 996ebc9d6cc04..b045e02ae36c7 100644 --- a/server/src/main/java/org/elasticsearch/action/ThreadingModel.java +++ b/server/src/main/java/org/elasticsearch/action/ThreadingModel.java @@ -37,7 +37,7 @@ public byte id() { } /** - * true if the actual operation the action represents will be executed + * {@code true} if the actual operation the action represents will be executed * on a different thread than the calling thread (assuming it will be executed * on the same node). */ @@ -46,7 +46,7 @@ public boolean threadedOperation() { } /** - * true if the invocation of the action result listener will be executed + * {@code true} if the invocation of the action result listener will be executed * on a different thread (than the calling thread or an "expensive" thread, like the * IO thread). */ diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java index 1fca07fb02479..9704fa482ba36 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java @@ -123,7 +123,7 @@ public int getDelayedUnassignedShards() { } /** - * true if the waitForXXX has timeout out and did not match. + * {@code true} if the waitForXXX has timeout out and did not match. */ public boolean isTimedOut() { return this.timedOut; diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequest.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequest.java index bd13c0000193d..5bdde81e6deb6 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequest.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequest.java @@ -51,7 +51,7 @@ public ClusterRerouteRequest add(AllocationCommand... commands) { } /** - * Sets a dry run flag (defaults to false) allowing to run the commands without + * Sets a dry run flag (defaults to {@code false}) allowing to run the commands without * actually applying them to the cluster state, and getting the resulting cluster state back. */ public ClusterRerouteRequest dryRun(boolean dryRun) { @@ -78,7 +78,7 @@ public ClusterRerouteRequest explain(boolean explain) { } /** - * Sets the retry failed flag (defaults to false). If true, the + * Sets the retry failed flag (defaults to {@code false}). If true, the * request will retry allocating shards that can't currently be allocated due to too many allocation failures. */ public ClusterRerouteRequest setRetryFailed(boolean retryFailed) { diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java index 3a7ffbeb44d24..7cdbe3c62b2f7 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java @@ -42,7 +42,7 @@ public ClusterRerouteRequestBuilder add(AllocationCommand... commands) { } /** - * Sets a dry run flag (defaults to false) allowing to run the commands without + * Sets a dry run flag (defaults to {@code false}) allowing to run the commands without * actually applying them to the cluster state, and getting the resulting cluster state back. */ public ClusterRerouteRequestBuilder setDryRun(boolean dryRun) { @@ -51,7 +51,7 @@ public ClusterRerouteRequestBuilder setDryRun(boolean dryRun) { } /** - * Sets the explain flag (defaults to false). If true, the + * Sets the explain flag (defaults to {@code false}). If true, the * request will include an explanation in addition to the cluster state. */ public ClusterRerouteRequestBuilder setExplain(boolean explain) { @@ -60,7 +60,7 @@ public ClusterRerouteRequestBuilder setExplain(boolean explain) { } /** - * Sets the retry failed flag (defaults to false). If true, the + * Sets the retry failed flag (defaults to {@code false}). If true, the * request will retry allocating shards that can't currently be allocated due to too many allocation failures. */ public ClusterRerouteRequestBuilder setRetryFailed(boolean retryFailed) { diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java index df38690b790a4..17de07559f82b 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java @@ -110,7 +110,7 @@ public ClusterSearchShardsRequest routing(String... routings) { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public ClusterSearchShardsRequest preference(String preference) { diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java index 7cb7ac1254c60..d89ac221065a3 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java @@ -55,7 +55,7 @@ public ClusterSearchShardsRequestBuilder setRouting(String... routing) { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public ClusterSearchShardsRequestBuilder setPreference(String preference) { diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestBuilder.java index 6ec7763e31b25..524e167e3a265 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestBuilder.java @@ -52,7 +52,7 @@ public ClusterStateRequestBuilder setBlocks(boolean filter) { /** * Should the cluster state result include the {@link org.elasticsearch.cluster.metadata.MetaData}. Defaults - * to true. + * to {@code true}. */ public ClusterStateRequestBuilder setMetaData(boolean filter) { request.metaData(filter); @@ -61,7 +61,7 @@ public ClusterStateRequestBuilder setMetaData(boolean filter) { /** * Should the cluster state result include the {@link org.elasticsearch.cluster.node.DiscoveryNodes}. Defaults - * to true. + * to {@code true}. */ public ClusterStateRequestBuilder setNodes(boolean filter) { request.nodes(filter); @@ -70,7 +70,7 @@ public ClusterStateRequestBuilder setNodes(boolean filter) { /** * Should the cluster state result include the {@link org.elasticsearch.cluster.ClusterState.Custom}. Defaults - * to true. + * to {@code true}. */ public ClusterStateRequestBuilder setCustoms(boolean filter) { request.customs(filter); @@ -79,7 +79,7 @@ public ClusterStateRequestBuilder setCustoms(boolean filter) { /** * Should the cluster state result include the {@link org.elasticsearch.cluster.routing.RoutingTable}. Defaults - * to true. + * to {@code true}. */ public ClusterStateRequestBuilder setRoutingTable(boolean filter) { request.routingTable(filter); diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequest.java b/server/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequest.java index f91b69755c14c..284b98b328055 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequest.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequest.java @@ -51,15 +51,15 @@ public FlushRequest(String... indices) { } /** - * Returns true iff a flush should block - * if a another flush operation is already running. Otherwise false + * Returns {@code true} iff a flush should block + * if a another flush operation is already running. Otherwise {@code false} */ public boolean waitIfOngoing() { return this.waitIfOngoing; } /** - * if set to true the flush will block + * if set to {@code true} the flush will block * if a another flush operation is already running until the flush can be performed. * The default is true */ diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequest.java b/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequest.java index 2b8fe5d2b01ae..91f965d6268da 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequest.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequest.java @@ -27,7 +27,7 @@ /** * A request to force merging the segments of one or more indices. In order to - * run a merge on all the indices, pass an empty array or null for the + * run a merge on all the indices, pass an empty array or {@code null} for the * indices. * {@link #maxNumSegments(int)} allows to control the number of segments * to force merge down to. Defaults to simply checking if a merge needs @@ -81,7 +81,7 @@ public ForceMergeRequest maxNumSegments(int maxNumSegments) { /** * Should the merge only expunge deletes from the index, without full merging. - * Defaults to full merging (false). + * Defaults to full merging ({@code false}). */ public boolean onlyExpungeDeletes() { return onlyExpungeDeletes; @@ -89,7 +89,7 @@ public boolean onlyExpungeDeletes() { /** * Should the merge only expunge deletes from the index, without full merge. - * Defaults to full merging (false). + * Defaults to full merging ({@code false}). */ public ForceMergeRequest onlyExpungeDeletes(boolean onlyExpungeDeletes) { this.onlyExpungeDeletes = onlyExpungeDeletes; @@ -97,14 +97,14 @@ public ForceMergeRequest onlyExpungeDeletes(boolean onlyExpungeDeletes) { } /** - * Should flush be performed after the merge. Defaults to true. + * Should flush be performed after the merge. Defaults to {@code true}. */ public boolean flush() { return flush; } /** - * Should flush be performed after the merge. Defaults to true. + * Should flush be performed after the merge. Defaults to {@code true}. */ public ForceMergeRequest flush(boolean flush) { this.flush = flush; diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java index 138db7078ee6b..285ef99a70a0d 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java @@ -24,7 +24,7 @@ /** * A request to force merge one or more indices. In order to force merge all - * indices, pass an empty array or null for the indices. + * indices, pass an empty array or {@code null} for the indices. * {@link #setMaxNumSegments(int)} allows to control the number of segments to force * merge down to. By default, will cause the force merge process to merge down * to half the configured number of segments. @@ -47,7 +47,7 @@ public ForceMergeRequestBuilder setMaxNumSegments(int maxNumSegments) { /** * Should the merge only expunge deletes from the index, without full merging. - * Defaults to full merging (false). + * Defaults to full merging ({@code false}). */ public ForceMergeRequestBuilder setOnlyExpungeDeletes(boolean onlyExpungeDeletes) { request.onlyExpungeDeletes(onlyExpungeDeletes); @@ -55,7 +55,7 @@ public ForceMergeRequestBuilder setOnlyExpungeDeletes(boolean onlyExpungeDeletes } /** - * Should flush be performed after the merge. Defaults to true. + * Should flush be performed after the merge. Defaults to {@code true}. */ public ForceMergeRequestBuilder setFlush(boolean flush) { request.flush(flush); diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java b/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java index 83c3f474e6616..8cd1fac6f6fd1 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java @@ -154,7 +154,7 @@ public Integer version() { } /** - * Set to true to force only creation, not an update of an index template. If it already + * Set to {@code true} to force only creation, not an update of an index template. If it already * exists, it will fail with an {@link IllegalArgumentException}. */ public PutIndexTemplateRequest create(boolean create) { diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java index 7b365f94ab498..5a9f359554bbf 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java @@ -76,7 +76,7 @@ public PutIndexTemplateRequestBuilder setVersion(Integer version) { } /** - * Set to true to force only creation, not an update of an index template. If it already + * Set to {@code true} to force only creation, not an update of an index template. If it already * exists, it will fail with an {@link IllegalArgumentException}. */ public PutIndexTemplateRequestBuilder setCreate(boolean create) { diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequest.java b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequest.java index be47ba22195ce..6a0288b78d4b0 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequest.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequest.java @@ -27,7 +27,7 @@ /** * A request to upgrade one or more indices. In order to update all indices, pass an empty array or - * null for the indices. + * {@code null} for the indices. * @see org.elasticsearch.client.Requests#upgradeRequest(String...) * @see org.elasticsearch.client.IndicesAdminClient#upgrade(UpgradeRequest) * @see UpgradeResponse @@ -67,7 +67,7 @@ public void writeTo(StreamOutput out) throws IOException { /** * Should the upgrade only the ancient (older major version of Lucene) segments? - * Defaults to false. + * Defaults to {@code false}. */ public boolean upgradeOnlyAncientSegments() { return upgradeOnlyAncientSegments; diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java index adc8ea5510a6c..e2c20a0e508ba 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java @@ -24,7 +24,7 @@ /** * A request to upgrade one or more indices. In order to optimize on all the indices, pass an empty array or - * null for the indices. + * {@code null} for the indices. */ public class UpgradeRequestBuilder extends BroadcastOperationRequestBuilder { diff --git a/server/src/main/java/org/elasticsearch/action/bulk/BulkItemResponse.java b/server/src/main/java/org/elasticsearch/action/bulk/BulkItemResponse.java index 6fd2fd2da848b..fb535d312cf65 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/BulkItemResponse.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/BulkItemResponse.java @@ -407,7 +407,7 @@ public long getVersion() { } /** - * The actual response ({@link IndexResponse} or {@link DeleteResponse}). null in + * The actual response ({@link IndexResponse} or {@link DeleteResponse}). {@code null} in * case of failure. */ public T getResponse() { @@ -422,7 +422,7 @@ public boolean isFailed() { } /** - * The failure message, null if it did not fail. + * The failure message, {@code null} if it did not fail. */ public String getFailureMessage() { if (failure != null) { diff --git a/server/src/main/java/org/elasticsearch/action/bulk/BulkProcessor.java b/server/src/main/java/org/elasticsearch/action/bulk/BulkProcessor.java index a622d8f39840f..f11444dd02288 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/BulkProcessor.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/BulkProcessor.java @@ -100,7 +100,7 @@ private Builder(BiConsumer> consumer, /** * Sets the number of concurrent requests allowed to be executed. A value of 0 means that only a single * request will be allowed to be executed. A value of 1 means 1 concurrent request is allowed to be executed - * while accumulating new bulk requests. Defaults to 1. + * while accumulating new bulk requests. Defaults to {@code 1}. */ public Builder setConcurrentRequests(int concurrentRequests) { this.concurrentRequests = concurrentRequests; @@ -109,7 +109,7 @@ public Builder setConcurrentRequests(int concurrentRequests) { /** * Sets when to flush a new bulk request based on the number of actions currently added. Defaults to - * 1000. Can be set to -1 to disable it. + * {@code 1000}. Can be set to {@code -1} to disable it. */ public Builder setBulkActions(int bulkActions) { this.bulkActions = bulkActions; @@ -118,7 +118,7 @@ public Builder setBulkActions(int bulkActions) { /** * Sets when to flush a new bulk request based on the size of actions currently added. Defaults to - * 5mb. Can be set to -1 to disable it. + * {@code 5mb}. Can be set to {@code -1} to disable it. */ public Builder setBulkSize(ByteSizeValue bulkSize) { this.bulkSize = bulkSize; @@ -129,7 +129,7 @@ public Builder setBulkSize(ByteSizeValue bulkSize) { * Sets a flush interval flushing *any* bulk actions pending if the interval passes. Defaults to not set. *

* Note, both {@link #setBulkActions(int)} and {@link #setBulkSize(org.elasticsearch.common.unit.ByteSizeValue)} - * can be set to -1 with the flush interval set allowing for complete async processing of bulk actions. + * can be set to {@code -1} with the flush interval set allowing for complete async processing of bulk actions. */ public Builder setFlushInterval(TimeValue flushInterval) { this.flushInterval = flushInterval; diff --git a/server/src/main/java/org/elasticsearch/action/bulk/BulkRequest.java b/server/src/main/java/org/elasticsearch/action/bulk/BulkRequest.java index cc2254070af2c..74e73843a993a 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/BulkRequest.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/BulkRequest.java @@ -514,7 +514,7 @@ public RefreshPolicy getRefreshPolicy() { } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ public final BulkRequest timeout(TimeValue timeout) { this.timeout = timeout; @@ -522,7 +522,7 @@ public final BulkRequest timeout(TimeValue timeout) { } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ public final BulkRequest timeout(String timeout) { return timeout(TimeValue.parseTimeValue(timeout, null, getClass().getSimpleName() + ".timeout")); diff --git a/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestBuilder.java index 7d2bca54d15e2..ca4a5ef2cbb91 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestBuilder.java @@ -132,7 +132,7 @@ public BulkRequestBuilder setWaitForActiveShards(final int waitForActiveShards) } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ public final BulkRequestBuilder setTimeout(TimeValue timeout) { request.timeout(timeout); @@ -140,7 +140,7 @@ public final BulkRequestBuilder setTimeout(TimeValue timeout) { } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ public final BulkRequestBuilder setTimeout(String timeout) { request.timeout(timeout); diff --git a/server/src/main/java/org/elasticsearch/action/get/GetRequest.java b/server/src/main/java/org/elasticsearch/action/get/GetRequest.java index 93045182f4c20..7a9b4ae18d39b 100644 --- a/server/src/main/java/org/elasticsearch/action/get/GetRequest.java +++ b/server/src/main/java/org/elasticsearch/action/get/GetRequest.java @@ -152,7 +152,7 @@ public GetRequest routing(String routing) { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public GetRequest preference(String preference) { @@ -189,7 +189,7 @@ public FetchSourceContext fetchSourceContext() { } /** - * Explicitly specify the stored fields that will be returned. By default, the _source + * Explicitly specify the stored fields that will be returned. By default, the {@code _source} * field will be returned. */ public GetRequest storedFields(String... fields) { @@ -198,7 +198,7 @@ public GetRequest storedFields(String... fields) { } /** - * Explicitly specify the stored fields that will be returned. By default, the _source + * Explicitly specify the stored fields that will be returned. By default, the {@code _source} * field will be returned. */ public String[] storedFields() { @@ -207,8 +207,8 @@ public String[] storedFields() { /** * Should a refresh be executed before this get operation causing the operation to - * return the latest value. Note, heavy get should not set this to true. Defaults - * to false. + * return the latest value. Note, heavy get should not set this to {@code true}. Defaults + * to {@code false}. */ public GetRequest refresh(boolean refresh) { this.refresh = refresh; diff --git a/server/src/main/java/org/elasticsearch/action/get/GetRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/get/GetRequestBuilder.java index 973b130bedbd2..16622f79a46c9 100644 --- a/server/src/main/java/org/elasticsearch/action/get/GetRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/get/GetRequestBuilder.java @@ -40,7 +40,7 @@ public GetRequestBuilder(ElasticsearchClient client, GetAction action, @Nullable } /** - * Sets the type of the document to fetch. If set to null, will use just the id to fetch the + * Sets the type of the document to fetch. If set to {@code null}, will use just the id to fetch the * first document matching it. */ public GetRequestBuilder setType(@Nullable String type) { @@ -76,7 +76,7 @@ public GetRequestBuilder setRouting(String routing) { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public GetRequestBuilder setPreference(String preference) { @@ -85,7 +85,7 @@ public GetRequestBuilder setPreference(String preference) { } /** - * Explicitly specify the fields that will be returned. By default, the _source + * Explicitly specify the fields that will be returned. By default, the {@code _source} * field will be returned. */ public GetRequestBuilder setStoredFields(String... fields) { @@ -132,8 +132,8 @@ public GetRequestBuilder setFetchSource(@Nullable String[] includes, @Nullable S /** * Should a refresh be executed before this get operation causing the operation to - * return the latest value. Note, heavy get should not set this to true. Defaults - * to false. + * return the latest value. Note, heavy get should not set this to {@code true}. Defaults + * to {@code false}. */ public GetRequestBuilder setRefresh(boolean refresh) { request.refresh(refresh); diff --git a/server/src/main/java/org/elasticsearch/action/get/MultiGetItemResponse.java b/server/src/main/java/org/elasticsearch/action/get/MultiGetItemResponse.java index bdaf8cff11b86..97ff2fe769f68 100644 --- a/server/src/main/java/org/elasticsearch/action/get/MultiGetItemResponse.java +++ b/server/src/main/java/org/elasticsearch/action/get/MultiGetItemResponse.java @@ -80,7 +80,7 @@ public boolean isFailed() { } /** - * The actual get response, null if its a failure. + * The actual get response, {@code null} if its a failure. */ public GetResponse getResponse() { return this.response; diff --git a/server/src/main/java/org/elasticsearch/action/get/MultiGetRequest.java b/server/src/main/java/org/elasticsearch/action/get/MultiGetRequest.java index 13588adc4b219..6246ca38ef75d 100644 --- a/server/src/main/java/org/elasticsearch/action/get/MultiGetRequest.java +++ b/server/src/main/java/org/elasticsearch/action/get/MultiGetRequest.java @@ -323,7 +323,7 @@ public ActionRequestValidationException validate() { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public MultiGetRequest preference(String preference) { diff --git a/server/src/main/java/org/elasticsearch/action/get/MultiGetRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/get/MultiGetRequestBuilder.java index a2cb204d5eabf..6b058039cf79e 100644 --- a/server/src/main/java/org/elasticsearch/action/get/MultiGetRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/get/MultiGetRequestBuilder.java @@ -58,7 +58,7 @@ public MultiGetRequestBuilder add(MultiGetRequest.Item item) { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public MultiGetRequestBuilder setPreference(String preference) { @@ -68,8 +68,8 @@ public MultiGetRequestBuilder setPreference(String preference) { /** * Should a refresh be executed before this get operation causing the operation to - * return the latest value. Note, heavy get should not set this to true. Defaults - * to false. + * return the latest value. Note, heavy get should not set this to {@code true}. Defaults + * to {@code false}. */ public MultiGetRequestBuilder setRefresh(boolean refresh) { request.refresh(refresh); diff --git a/server/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java b/server/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java index 25a624b2eb558..27ebb24b2dbc8 100644 --- a/server/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java +++ b/server/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java @@ -64,7 +64,7 @@ public int shardId() { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public MultiGetShardRequest preference(String preference) { diff --git a/server/src/main/java/org/elasticsearch/action/index/IndexRequest.java b/server/src/main/java/org/elasticsearch/action/index/IndexRequest.java index 9df3164388188..55b0a0511c2e7 100644 --- a/server/src/main/java/org/elasticsearch/action/index/IndexRequest.java +++ b/server/src/main/java/org/elasticsearch/action/index/IndexRequest.java @@ -431,7 +431,7 @@ public IndexRequest opType(String opType) { /** - * Set to true to force this index to use {@link OpType#CREATE}. + * Set to {@code true} to force this index to use {@link OpType#CREATE}. */ public IndexRequest create(boolean create) { if (create) { diff --git a/server/src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java index 88b094a33f521..1280114f49855 100644 --- a/server/src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java @@ -184,7 +184,7 @@ public IndexRequestBuilder setOpType(DocWriteRequest.OpType opType) { } /** - * Set to true to force this index to use {@link org.elasticsearch.action.index.IndexRequest.OpType#CREATE}. + * Set to {@code true} to force this index to use {@link org.elasticsearch.action.index.IndexRequest.OpType#CREATE}. */ public IndexRequestBuilder setCreate(boolean create) { request.create(create); diff --git a/server/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java b/server/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java index 88a210c718019..baf5ec11ef72a 100644 --- a/server/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java +++ b/server/src/main/java/org/elasticsearch/action/index/TransportIndexAction.java @@ -37,9 +37,9 @@ * * Allows for the following settings: *

    - *
  • autoCreateIndex: When set to true, will automatically create an index if one does not exists. - * Defaults to true. - *
  • allowIdGeneration: If the id is set not, should it be generated. Defaults to true. + *
  • autoCreateIndex: When set to {@code true}, will automatically create an index if one does not exists. + * Defaults to {@code true}. + *
  • allowIdGeneration: If the id is set not, should it be generated. Defaults to {@code true}. *
* * Deprecated use TransportBulkAction with a single item instead diff --git a/server/src/main/java/org/elasticsearch/action/search/InitialSearchPhase.java b/server/src/main/java/org/elasticsearch/action/search/InitialSearchPhase.java index 0d8c0c33cc998..a3be7c39affe8 100644 --- a/server/src/main/java/org/elasticsearch/action/search/InitialSearchPhase.java +++ b/server/src/main/java/org/elasticsearch/action/search/InitialSearchPhase.java @@ -41,7 +41,7 @@ * This is an abstract base class that encapsulates the logic to fan out to all shards in provided {@link GroupShardsIterator} * and collect the results. If a shard request returns a failure this class handles the advance to the next replica of the shard until * the shards replica iterator is exhausted. Each shard is referenced by position in the {@link GroupShardsIterator} which is later - * referred to as the shardIndex. + * referred to as the {@code shardIndex}. * The fan out and collect algorithm is traditionally used as the initial phase which can either be a query execution or collection * distributed frequencies */ diff --git a/server/src/main/java/org/elasticsearch/action/search/SearchRequest.java b/server/src/main/java/org/elasticsearch/action/search/SearchRequest.java index a00a4d8eb2cda..37b8088f8b9db 100644 --- a/server/src/main/java/org/elasticsearch/action/search/SearchRequest.java +++ b/server/src/main/java/org/elasticsearch/action/search/SearchRequest.java @@ -208,7 +208,7 @@ public SearchRequest routing(String... routings) { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public SearchRequest preference(String preference) { @@ -346,7 +346,7 @@ public int getBatchedReduceSize() { /** * Returns the number of shard requests that should be executed concurrently. This value should be used as a protection mechanism to * reduce the number of shard reqeusts fired per high level search request. Searches that hit the entire cluster can be throttled - * with this number to reduce the cluster load. The default grows with the number of nodes in the cluster but is at most 256. + * with this number to reduce the cluster load. The default grows with the number of nodes in the cluster but is at most {@code 256}. */ public int getMaxConcurrentShardRequests() { return maxConcurrentShardRequests == 0 ? 256 : maxConcurrentShardRequests; @@ -355,7 +355,7 @@ public int getMaxConcurrentShardRequests() { /** * Sets the number of shard requests that should be executed concurrently. This value should be used as a protection mechanism to * reduce the number of shard requests fired per high level search request. Searches that hit the entire cluster can be throttled - * with this number to reduce the cluster load. The default grows with the number of nodes in the cluster but is at most 256. + * with this number to reduce the cluster load. The default grows with the number of nodes in the cluster but is at most {@code 256}. */ public void setMaxConcurrentShardRequests(int maxConcurrentShardRequests) { if (maxConcurrentShardRequests < 1) { @@ -367,7 +367,7 @@ public void setMaxConcurrentShardRequests(int maxConcurrentShardRequests) { * Sets a threshold that enforces a pre-filter roundtrip to pre-filter search shards based on query rewriting if the number of shards * the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for * instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard - * bounds and the query are disjoint. The default is 128 + * bounds and the query are disjoint. The default is {@code 128} */ public void setPreFilterShardSize(int preFilterShardSize) { if (preFilterShardSize < 1) { @@ -380,7 +380,7 @@ public void setPreFilterShardSize(int preFilterShardSize) { * Returns a threshold that enforces a pre-filter roundtrip to pre-filter search shards based on query rewriting if the number of shards * the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for * instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard - * bounds and the query are disjoint. The default is 128 + * bounds and the query are disjoint. The default is {@code 128} */ public int getPreFilterShardSize() { return preFilterShardSize; diff --git a/server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java index 149d5390420c1..b1363f5c5344f 100644 --- a/server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java @@ -144,7 +144,7 @@ public SearchRequestBuilder setRouting(String... routing) { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public SearchRequestBuilder setPreference(String preference) { @@ -190,7 +190,7 @@ public SearchRequestBuilder setMinScore(float minScore) { } /** - * From index to start the search from. Defaults to 0. + * From index to start the search from. Defaults to {@code 0}. */ public SearchRequestBuilder setFrom(int from) { sourceBuilder().from(from); @@ -198,7 +198,7 @@ public SearchRequestBuilder setFrom(int from) { } /** - * The number of search hits to return. Defaults to 10. + * The number of search hits to return. Defaults to {@code 10}. */ public SearchRequestBuilder setSize(int size) { sourceBuilder().size(size); @@ -349,7 +349,7 @@ public SearchRequestBuilder slice(SliceBuilder builder) { } /** - * Applies when sorting, and controls if scores will be tracked as well. Defaults to false. + * Applies when sorting, and controls if scores will be tracked as well. Defaults to {@code false}. */ public SearchRequestBuilder setTrackScores(boolean trackScores) { sourceBuilder().trackScores(trackScores); @@ -357,7 +357,7 @@ public SearchRequestBuilder setTrackScores(boolean trackScores) { } /** - * Indicates if the total hit count for the query should be tracked. Defaults to true + * Indicates if the total hit count for the query should be tracked. Defaults to {@code true} */ public SearchRequestBuilder setTrackTotalHits(boolean trackTotalHits) { sourceBuilder().trackTotalHits(trackTotalHits); @@ -539,7 +539,7 @@ public SearchRequestBuilder setBatchedReduceSize(int batchedReduceSize) { /** * Sets the number of shard requests that should be executed concurrently. This value should be used as a protection mechanism to * reduce the number of shard requests fired per high level search request. Searches that hit the entire cluster can be throttled - * with this number to reduce the cluster load. The default grows with the number of nodes in the cluster but is at most 256. + * with this number to reduce the cluster load. The default grows with the number of nodes in the cluster but is at most {@code 256}. */ public SearchRequestBuilder setMaxConcurrentShardRequests(int maxConcurrentShardRequests) { this.request.setMaxConcurrentShardRequests(maxConcurrentShardRequests); @@ -550,7 +550,7 @@ public SearchRequestBuilder setMaxConcurrentShardRequests(int maxConcurrentShard * Sets a threshold that enforces a pre-filter roundtrip to pre-filter search shards based on query rewriting if the number of shards * the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for * instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard - * bounds and the query are disjoint. The default is 128 + * bounds and the query are disjoint. The default is {@code 128} */ public SearchRequestBuilder setPreFilterShardSize(int preFilterShardSize) { this.request.setPreFilterShardSize(preFilterShardSize); diff --git a/server/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequestBuilder.java index 939f47f9acf96..6a4a2b9c0d7e4 100644 --- a/server/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequestBuilder.java @@ -43,7 +43,7 @@ public RequestBuilder setTimeout(TimeValue timeout) { /** * Timeout to wait for the operation to be acknowledged by current cluster nodes. Defaults - * to 10s. + * to {@code 10s}. */ @SuppressWarnings("unchecked") public RequestBuilder setTimeout(String timeout) { diff --git a/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequest.java b/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequest.java index 3dc222f9e3a90..c463ad76c856e 100644 --- a/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequest.java +++ b/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequest.java @@ -79,7 +79,7 @@ public ReplicationRequest(ShardId shardId) { } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ @SuppressWarnings("unchecked") public final Request timeout(TimeValue timeout) { @@ -88,7 +88,7 @@ public final Request timeout(TimeValue timeout) { } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ public final Request timeout(String timeout) { return timeout(TimeValue.parseTimeValue(timeout, null, getClass().getSimpleName() + ".timeout")); diff --git a/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequestBuilder.java index 4ef20fcb15bc8..15d36ad346780 100644 --- a/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequestBuilder.java @@ -34,7 +34,7 @@ protected ReplicationRequestBuilder(ElasticsearchClient client, Action1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ @SuppressWarnings("unchecked") public final RequestBuilder setTimeout(TimeValue timeout) { @@ -43,7 +43,7 @@ public final RequestBuilder setTimeout(TimeValue timeout) { } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ @SuppressWarnings("unchecked") public final RequestBuilder setTimeout(String timeout) { diff --git a/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequest.java b/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequest.java index 2490110927f98..56645c30e2d6f 100644 --- a/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequest.java +++ b/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequest.java @@ -86,7 +86,7 @@ public TimeValue timeout() { } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ @SuppressWarnings("unchecked") public final Request timeout(TimeValue timeout) { @@ -95,7 +95,7 @@ public final Request timeout(TimeValue timeout) { } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ public final Request timeout(String timeout) { return timeout(TimeValue.parseTimeValue(timeout, null, getClass().getSimpleName() + ".timeout")); diff --git a/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java index 7bec08ce9ecd2..9e7a48dc49eea 100644 --- a/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java @@ -39,7 +39,7 @@ public final RequestBuilder setIndex(String index) { } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ @SuppressWarnings("unchecked") public final RequestBuilder setTimeout(TimeValue timeout) { @@ -48,7 +48,7 @@ public final RequestBuilder setTimeout(TimeValue timeout) { } /** - * A timeout to wait if the index operation can't be performed immediately. Defaults to 1m. + * A timeout to wait if the index operation can't be performed immediately. Defaults to {@code 1m}. */ @SuppressWarnings("unchecked") public final RequestBuilder setTimeout(String timeout) { diff --git a/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsItemResponse.java b/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsItemResponse.java index ef84ea8645839..3e32af7f2c250 100644 --- a/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsItemResponse.java +++ b/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsItemResponse.java @@ -81,7 +81,7 @@ public boolean isFailed() { } /** - * The actual get response, null if its a failure. + * The actual get response, {@code null} if its a failure. */ public TermVectorsResponse getResponse() { return this.response; diff --git a/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsShardRequest.java b/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsShardRequest.java index 6356c554991e6..c6cc8e062affa 100644 --- a/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsShardRequest.java +++ b/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsShardRequest.java @@ -59,7 +59,7 @@ public int shardId() { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public MultiTermVectorsShardRequest preference(String preference) { diff --git a/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsFields.java b/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsFields.java index 92086cdd97d1c..031a537c37b34 100644 --- a/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsFields.java +++ b/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsFields.java @@ -44,7 +44,7 @@ * exactly like the {@link Fields} class except for one thing: It can return * offsets and payloads even if positions are not present. You must call * nextPosition() anyway to move the counter although this method only returns - * -1,, if no positions were returned by the {@link TermVectorsRequest}. + * {@code -1,}, if no positions were returned by the {@link TermVectorsRequest}. *

* The data is stored in two byte arrays ({@code headerRef} and * {@code termVectors}, both {@link BytesRef}) that have the following format: diff --git a/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java b/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java index 1a3ec32142d8f..e026ef6ff0877 100644 --- a/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java +++ b/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java @@ -311,8 +311,8 @@ public String preference() { /** * Sets the preference to execute the search. Defaults to randomize across - * shards. Can be set to _local to prefer local shards, - * _primary to execute only on primary shards, or a custom value, + * shards. Can be set to {@code _local} to prefer local shards, + * {@code _primary} to execute only on primary shards, or a custom value, * which guarantees that the same order will be used across different * requests. */ diff --git a/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequestBuilder.java index 9aa3ebca759c3..00f8232d6a53a 100644 --- a/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequestBuilder.java @@ -99,7 +99,7 @@ public TermVectorsRequestBuilder setParent(String parent) { /** * Sets the preference to execute the search. Defaults to randomize across shards. Can be set to - * _local to prefer local shards, _primary to execute only on primary shards, or + * {@code _local} to prefer local shards, {@code _primary} to execute only on primary shards, or * a custom value, which guarantees that the same order will be used across different requests. */ public TermVectorsRequestBuilder setPreference(String preference) { diff --git a/server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java b/server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java index ccb3296a5d593..468863266fcf3 100644 --- a/server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java +++ b/server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java @@ -310,7 +310,7 @@ public interface ClusterAdminClient extends ElasticsearchClient { /** * Returns a request builder to fetch top N hot-threads samples per node. The hot-threads are only sampled - * for the node ids provided. Note: Use * to fetch samples for all nodes + * for the node ids provided. Note: Use {@code *} to fetch samples for all nodes */ NodesHotThreadsRequestBuilder prepareNodesHotThreads(String... nodesIds); diff --git a/server/src/main/java/org/elasticsearch/client/Requests.java b/server/src/main/java/org/elasticsearch/client/Requests.java index 74f83452e51ab..19ad2fb397edc 100644 --- a/server/src/main/java/org/elasticsearch/client/Requests.java +++ b/server/src/main/java/org/elasticsearch/client/Requests.java @@ -130,7 +130,7 @@ public static GetRequest getRequest(String index) { * Creates a search request against one or more indices. Note, the search source must be set either using the * actual JSON search source, or the {@link org.elasticsearch.search.builder.SearchSourceBuilder}. * - * @param indices The indices to search against. Use null or _all to execute against all indices + * @param indices The indices to search against. Use {@code null} or {@code _all} to execute against all indices * @return The search request * @see org.elasticsearch.client.Client#search(org.elasticsearch.action.search.SearchRequest) */ @@ -220,7 +220,7 @@ public static OpenIndexRequest openIndexRequest(String index) { /** * Create a create mapping request against one or more indices. * - * @param indices The indices to create mapping. Use null or _all to execute against all indices + * @param indices The indices to create mapping. Use {@code null} or {@code _all} to execute against all indices * @return The create mapping request * @see org.elasticsearch.client.IndicesAdminClient#putMapping(org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest) */ @@ -240,7 +240,7 @@ public static IndicesAliasesRequest indexAliasesRequest() { /** * Creates a refresh indices request. * - * @param indices The indices to refresh. Use null or _all to execute against all indices + * @param indices The indices to refresh. Use {@code null} or {@code _all} to execute against all indices * @return The refresh request * @see org.elasticsearch.client.IndicesAdminClient#refresh(org.elasticsearch.action.admin.indices.refresh.RefreshRequest) */ @@ -251,7 +251,7 @@ public static RefreshRequest refreshRequest(String... indices) { /** * Creates a flush indices request. * - * @param indices The indices to flush. Use null or _all to execute against all indices + * @param indices The indices to flush. Use {@code null} or {@code _all} to execute against all indices * @return The flush request * @see org.elasticsearch.client.IndicesAdminClient#flush(org.elasticsearch.action.admin.indices.flush.FlushRequest) */ @@ -262,7 +262,7 @@ public static FlushRequest flushRequest(String... indices) { /** * Creates a synced flush indices request. * - * @param indices The indices to sync flush. Use null or _all to execute against all indices + * @param indices The indices to sync flush. Use {@code null} or {@code _all} to execute against all indices * @return The synced flush request * @see org.elasticsearch.client.IndicesAdminClient#syncedFlush(SyncedFlushRequest) */ @@ -273,7 +273,7 @@ public static SyncedFlushRequest syncedFlushRequest(String... indices) { /** * Creates a force merge request. * - * @param indices The indices to force merge. Use null or _all to execute against all indices + * @param indices The indices to force merge. Use {@code null} or {@code _all} to execute against all indices * @return The force merge request * @see org.elasticsearch.client.IndicesAdminClient#forceMerge(org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequest) */ @@ -284,7 +284,7 @@ public static ForceMergeRequest forceMergeRequest(String... indices) { /** * Creates an upgrade request. * - * @param indices The indices to upgrade. Use null or _all to execute against all indices + * @param indices The indices to upgrade. Use {@code null} or {@code _all} to execute against all indices * @return The upgrade request * @see org.elasticsearch.client.IndicesAdminClient#upgrade(UpgradeRequest) */ @@ -295,7 +295,7 @@ public static UpgradeRequest upgradeRequest(String... indices) { /** * Creates a clean indices cache request. * - * @param indices The indices to clean their caches. Use null or _all to execute against all indices + * @param indices The indices to clean their caches. Use {@code null} or {@code _all} to execute against all indices * @return The request */ public static ClearIndicesCacheRequest clearIndicesCacheRequest(String... indices) { @@ -305,7 +305,7 @@ public static ClearIndicesCacheRequest clearIndicesCacheRequest(String... indice /** * A request to update indices settings. * - * @param indices The indices to update the settings for. Use null or _all to executed against all indices. + * @param indices The indices to update the settings for. Use {@code null} or {@code _all} to executed against all indices. * @return The request */ public static UpdateSettingsRequest updateSettingsRequest(String... indices) { @@ -334,7 +334,7 @@ public static ClusterUpdateSettingsRequest clusterUpdateSettingsRequest() { * Creates a cluster health request. * * @param indices The indices to provide additional cluster health information for. - * Use null or _all to execute against all indices + * Use {@code null} or {@code _all} to execute against all indices * @return The cluster health request * @see org.elasticsearch.client.ClusterAdminClient#health(org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest) */ @@ -367,7 +367,7 @@ public static NodesInfoRequest nodesInfoRequest() { } /** - * Creates a nodes info request against one or more nodes. Pass null or an empty array for all nodes. + * Creates a nodes info request against one or more nodes. Pass {@code null} or an empty array for all nodes. * * @param nodesIds The nodes ids to get the status for * @return The nodes info request @@ -378,7 +378,7 @@ public static NodesInfoRequest nodesInfoRequest(String... nodesIds) { } /** - * Creates a nodes stats request against one or more nodes. Pass null or an empty array for all nodes. + * Creates a nodes stats request against one or more nodes. Pass {@code null} or an empty array for all nodes. * * @param nodesIds The nodes ids to get the stats for * @return The nodes info request @@ -390,7 +390,7 @@ public static NodesStatsRequest nodesStatsRequest(String... nodesIds) { /** * Creates a nodes usage request against one or more nodes. Pass - * null or an empty array for all nodes. + * {@code null} or an empty array for all nodes. * * @param nodesIds * The nodes ids to get the usage for @@ -432,7 +432,7 @@ public static GetTaskRequest getTaskRequest() { } /** - * Creates a nodes tasks request against one or more nodes. Pass null or an empty array for all nodes. + * Creates a nodes tasks request against one or more nodes. Pass {@code null} or an empty array for all nodes. * * @return The nodes tasks request * @see org.elasticsearch.client.ClusterAdminClient#cancelTasks(CancelTasksRequest) diff --git a/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlocks.java b/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlocks.java index ee4779bc8c514..6343c2f72746d 100644 --- a/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlocks.java +++ b/server/src/main/java/org/elasticsearch/cluster/block/ClusterBlocks.java @@ -104,7 +104,7 @@ private static EnumMap generateLevelHol } /** - * Returns true if one of the global blocks as its disable state persistence flag set. + * Returns {@code true} if one of the global blocks as its disable state persistence flag set. */ public boolean disableStatePersistence() { for (ClusterBlock clusterBlock : global) { diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/AutoExpandReplicas.java b/server/src/main/java/org/elasticsearch/cluster/metadata/AutoExpandReplicas.java index fa30abe5a736b..c2a23a378f106 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/AutoExpandReplicas.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/AutoExpandReplicas.java @@ -23,7 +23,7 @@ import org.elasticsearch.common.settings.Setting.Property; /** - * This class acts as a functional wrapper around the index.auto_expand_replicas setting. + * This class acts as a functional wrapper around the {@code index.auto_expand_replicas} setting. * This setting or rather it's value is expanded into a min and max value which requires special handling * based on the number of datanodes in the cluster. This class handles all the parsing and streamlines the access to these values. */ diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java index 26ff599b590a5..4ce6141929425 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java @@ -1317,7 +1317,7 @@ public int getRoutingNumShards() { } /** - * Returns the routing factor for this index. The default is 1. + * Returns the routing factor for this index. The default is {@code 1}. * * @see #getRoutingFactor(int, int) for details */ diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolver.java b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolver.java index 1f36e50ca1d71..8fa3c2e0fc193 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolver.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolver.java @@ -277,7 +277,7 @@ public String resolveDateMathExpression(String dateExpression) { * Iterates through the list of indices and selects the effective list of filtering aliases for the * given index. *

Only aliases with filters are returned. If the indices list contains a non-filtering reference to - * the index itself - null is returned. Returns null if no filtering is required. + * the index itself - null is returned. Returns {@code null} if no filtering is required. */ public String[] filteringAliases(ClusterState state, String index, String... expressions) { return indexAliases(state, index, AliasMetaData::filteringRequired, false, expressions); @@ -286,7 +286,7 @@ public String[] filteringAliases(ClusterState state, String index, String... exp /** * Iterates through the list of indices and selects the effective list of required aliases for the given index. *

Only aliases where the given predicate tests successfully are returned. If the indices list contains a non-required reference to - * the index itself - null is returned. Returns null if no filtering is required. + * the index itself - null is returned. Returns {@code null} if no filtering is required. */ public String[] indexAliases(ClusterState state, String index, Predicate requiredAlias, boolean skipIdentity, String... expressions) { diff --git a/server/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java b/server/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java index 7ac7af2ecd2e7..4686ffba5b4a7 100644 --- a/server/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java +++ b/server/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java @@ -83,7 +83,7 @@ public Iterator iterator() { } /** - * Returns true if the local node is the elected master node. + * Returns {@code true} if the local node is the elected master node. */ public boolean isLocalNodeElectedMaster() { if (localNodeId == null) { diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/IndexRoutingTable.java b/server/src/main/java/org/elasticsearch/cluster/routing/IndexRoutingTable.java index 5a4e0c78414dd..4e7e81def8739 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/IndexRoutingTable.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/IndexRoutingTable.java @@ -52,7 +52,7 @@ * single shard in this context has one more instances namely exactly one * {@link ShardRouting#primary() primary} and 1 or more replicas. In other * words, each instance of a shard is considered a replica while only one - * replica per shard is a primary replica. The primary replica + * replica per shard is a {@code primary} replica. The {@code primary} replica * can be seen as the "leader" of the shard acting as the primary entry point * for operations on a specific shard. *

diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/ShardsIterator.java b/server/src/main/java/org/elasticsearch/cluster/routing/ShardsIterator.java index 638875ea07138..dacf49cb73684 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/ShardsIterator.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/ShardsIterator.java @@ -45,7 +45,7 @@ public interface ShardsIterator extends Iterable { int sizeActive(); /** - * Returns the next shard, or null if none available. + * Returns the next shard, or {@code null} if none available. */ ShardRouting nextOrNull(); diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java index a60287a8487a3..7998a1d27dd66 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java @@ -173,7 +173,7 @@ public float getShardBalance() { *

* Each of these properties are expressed as factor such that the properties factor defines the relative importance of the property for the * weight function. For example if the weight function should calculate the weights only based on a global (shard) balance the index balance - * can be set to 0.0 and will in turn have no effect on the distribution. + * can be set to {@code 0.0} and will in turn have no effect on the distribution. *

* The weight per index is calculated based on the following formula: *
    @@ -476,9 +476,9 @@ public Map weighShard(ShardRouting shard) { * {@link WeightFunction}. This weight is calculated per index to * distribute shards evenly per index. The balancer tries to relocate * shards only if the delta exceeds the threshold. In the default case - * the threshold is set to 1.0 to enforce gaining relocation + * the threshold is set to {@code 1.0} to enforce gaining relocation * only, or in other words relocations that move the weight delta closer - * to 0.0 + * to {@code 0.0} */ private void balanceByWeights() { final AllocationDeciders deciders = allocation.deciders(); diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/AwarenessAllocationDecider.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/AwarenessAllocationDecider.java index f00e9cdc3ce8f..e7e538ae3713f 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/AwarenessAllocationDecider.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/AwarenessAllocationDecider.java @@ -36,7 +36,7 @@ /** * This {@link AllocationDecider} controls shard allocation based on - * awareness key-value pairs defined in the node configuration. + * {@code awareness} key-value pairs defined in the node configuration. * Awareness explicitly controls where replicas should be allocated based on * attributes like node or physical rack locations. Awareness attributes accept * arbitrary configuration keys like a rack data-center identifier. For example @@ -48,7 +48,7 @@ * will cause allocations to be distributed over different racks such that * ideally at least one replicas of the all shard is available on the same rack. * To enable allocation awareness in this example nodes should contain a value - * for the rack_id key like: + * for the {@code rack_id} key like: *
      * node.attr.rack_id:1
      * 
    @@ -67,7 +67,7 @@ * *

    * In contrast to regular awareness this setting will prevent over-allocation on - * zone1 even if zone2 fails partially or becomes entirely + * {@code zone1} even if {@code zone2} fails partially or becomes entirely * unavailable. Nodes that belong to a certain zone / group should be started * with the zone id configured on the node-level settings like: *

    diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ClusterRebalanceAllocationDecider.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ClusterRebalanceAllocationDecider.java
    index 281f6a603c3f3..ea945c23c728c 100644
    --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ClusterRebalanceAllocationDecider.java
    +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ClusterRebalanceAllocationDecider.java
    @@ -32,16 +32,16 @@
      * This {@link AllocationDecider} controls re-balancing operations based on the
      * cluster wide active shard state. This decided can not be configured in
      * real-time and should be pre-cluster start via
    - * cluster.routing.allocation.allow_rebalance. This setting respects the following
    + * {@code cluster.routing.allocation.allow_rebalance}. This setting respects the following
      * values:
      * 
      - *
    • indices_primaries_active - Re-balancing is allowed only once all + *
    • {@code indices_primaries_active} - Re-balancing is allowed only once all * primary shards on all indices are active.
    • * - *
    • indices_all_active - Re-balancing is allowed only once all + *
    • {@code indices_all_active} - Re-balancing is allowed only once all * shards on all indices are active.
    • * - *
    • always - Re-balancing is allowed once a shard replication group + *
    • {@code always} - Re-balancing is allowed once a shard replication group * is active
    • *
    */ diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ConcurrentRebalanceAllocationDecider.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ConcurrentRebalanceAllocationDecider.java index 63fbad59b922a..05351109c8657 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ConcurrentRebalanceAllocationDecider.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ConcurrentRebalanceAllocationDecider.java @@ -31,11 +31,11 @@ * {@link AllocationDecider} controls the number of currently in-progress * re-balance (relocation) operations and restricts node allocations if the * configured threshold is reached. The default number of concurrent rebalance - * operations is set to 2 + * operations is set to {@code 2} *

    * Re-balance operations can be controlled in real-time via the cluster update API using - * cluster.routing.allocation.cluster_concurrent_rebalance. Iff this - * setting is set to -1 the number of concurrent re-balance operations + * {@code cluster.routing.allocation.cluster_concurrent_rebalance}. Iff this + * setting is set to {@code -1} the number of concurrent re-balance operations * are unlimited. */ public class ConcurrentRebalanceAllocationDecider extends AllocationDecider { diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDecider.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDecider.java index 06a0859cee7c5..f3146f6f771e8 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDecider.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDecider.java @@ -44,8 +44,8 @@ * This filter is used to make explicit decision on which nodes certain shard * can / should be allocated. The decision if a shard can be allocated, must not * be allocated or should be allocated is based on either cluster wide dynamic - * settings (cluster.routing.allocation.*) or index specific dynamic - * settings (index.routing.allocation.*). All of those settings can be + * settings ({@code cluster.routing.allocation.*}) or index specific dynamic + * settings ({@code index.routing.allocation.*}). All of those settings can be * changed at runtime via the cluster or the index update settings API. *

    * Note: Cluster settings are applied first and will override index specific @@ -53,14 +53,14 @@ * settings it wont be allocated on a node if the cluster specific settings * would disallow the allocation. Filters are applied in the following order: *
      - *
    1. required - filters required allocations. - * If any required filters are set the allocation is denied if the index is not in the set of required to allocate + *
    2. {@code required} - filters required allocations. + * If any {@code required} filters are set the allocation is denied if the index is not in the set of {@code required} to allocate * on the filtered node
    3. - *
    4. include - filters "allowed" allocations. - * If any include filters are set the allocation is denied if the index is not in the set of include filters for + *
    5. {@code include} - filters "allowed" allocations. + * If any {@code include} filters are set the allocation is denied if the index is not in the set of {@code include} filters for * the filtered node
    6. - *
    7. exclude - filters "prohibited" allocations. - * If any exclude filters are set the allocation is denied if the index is in the set of exclude filters for the + *
    8. {@code exclude} - filters "prohibited" allocations. + * If any {@code exclude} filters are set the allocation is denied if the index is in the set of {@code exclude} filters for the * filtered node
    9. *
    */ diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/MaxRetryAllocationDecider.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/MaxRetryAllocationDecider.java index c3817b429bbf3..4c580509e9229 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/MaxRetryAllocationDecider.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/MaxRetryAllocationDecider.java @@ -30,8 +30,8 @@ /** * An allocation decider that prevents shards from being allocated on any node if the shards allocation has been retried N times without * success. This means if a shard has been INITIALIZING N times in a row without being moved to STARTED the shard will be ignored until - * the setting for index.allocation.max_retry is raised. The default value is 5. - * Note: This allocation decider also allows allocation of repeatedly failing shards when the /_cluster/reroute?retry_failed=true + * the setting for {@code index.allocation.max_retry} is raised. The default value is {@code 5}. + * Note: This allocation decider also allows allocation of repeatedly failing shards when the {@code /_cluster/reroute?retry_failed=true} * API is manually invoked. This allows single retries without raising the limits. * */ diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/SameShardAllocationDecider.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/SameShardAllocationDecider.java index 1bf776422521c..cc2d488974baa 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/SameShardAllocationDecider.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/SameShardAllocationDecider.java @@ -30,17 +30,17 @@ /** * An allocation decider that prevents multiple instances of the same shard to - * be allocated on the same node. + * be allocated on the same {@code node}. * * The {@link #CLUSTER_ROUTING_ALLOCATION_SAME_HOST_SETTING} setting allows to perform a check to prevent - * allocation of multiple instances of the same shard on a single host, + * allocation of multiple instances of the same shard on a single {@code host}, * based on host name and host address. Defaults to `false`, meaning that no * check is performed by default. * *

    * Note: this setting only applies if multiple nodes are started on the same - * host. Allocations of multiple copies of the same shard on the same - * node are not allowed independently of this setting. + * {@code host}. Allocations of multiple copies of the same shard on the same + * {@code node} are not allowed independently of this setting. *

    */ public class SameShardAllocationDecider extends AllocationDecider { diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ShardsLimitAllocationDecider.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ShardsLimitAllocationDecider.java index 2118d37fe4717..398ee0a17ad54 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ShardsLimitAllocationDecider.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ShardsLimitAllocationDecider.java @@ -34,12 +34,12 @@ /** * This {@link AllocationDecider} limits the number of shards per node on a per * index or node-wide basis. The allocator prevents a single node to hold more - * than index.routing.allocation.total_shards_per_node per index and - * cluster.routing.allocation.total_shards_per_node globally during the allocation + * than {@code index.routing.allocation.total_shards_per_node} per index and + * {@code cluster.routing.allocation.total_shards_per_node} globally during the allocation * process. The limits of this decider can be changed in real-time via a the * index settings API. *

    - * If index.routing.allocation.total_shards_per_node is reset to a negative value shards + * If {@code index.routing.allocation.total_shards_per_node} is reset to a negative value shards * per index are unlimited per node. Shards currently in the * {@link ShardRoutingState#RELOCATING relocating} state are ignored by this * {@link AllocationDecider} until the shard changed its state to either diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ThrottlingAllocationDecider.java b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ThrottlingAllocationDecider.java index e52102774dd81..7821ad11a52cd 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ThrottlingAllocationDecider.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ThrottlingAllocationDecider.java @@ -37,12 +37,12 @@ * the cluster. It exposes two settings via the cluster update API that allow * changes in real-time: *

      - *
    • cluster.routing.allocation.node_initial_primaries_recoveries - + *
    • {@code cluster.routing.allocation.node_initial_primaries_recoveries} - * restricts the number of initial primary shard recovery operations on a single - * node. The default is 4
    • - *
    • cluster.routing.allocation.node_concurrent_recoveries - + * node. The default is {@code 4}
    • + *
    • {@code cluster.routing.allocation.node_concurrent_recoveries} - * restricts the number of total concurrent shards initializing on a single node. The - * default is 2
    • + * default is {@code 2} *
    *

    * If one of the above thresholds is exceeded per node this allocation decider diff --git a/server/src/main/java/org/elasticsearch/common/FieldMemoryStats.java b/server/src/main/java/org/elasticsearch/common/FieldMemoryStats.java index 7f63784d92a84..9f4090d5c6b0c 100644 --- a/server/src/main/java/org/elasticsearch/common/FieldMemoryStats.java +++ b/server/src/main/java/org/elasticsearch/common/FieldMemoryStats.java @@ -32,7 +32,7 @@ import java.util.Objects; /** - * A reusable class to encode field -> memory size mappings + * A reusable class to encode {@code field -> memory size} mappings */ public final class FieldMemoryStats implements Writeable, Iterable>{ diff --git a/server/src/main/java/org/elasticsearch/common/bytes/BytesReference.java b/server/src/main/java/org/elasticsearch/common/bytes/BytesReference.java index 806b153c803a6..ed8b073c8a691 100644 --- a/server/src/main/java/org/elasticsearch/common/bytes/BytesReference.java +++ b/server/src/main/java/org/elasticsearch/common/bytes/BytesReference.java @@ -65,7 +65,7 @@ public static BytesReference bytes(XContentBuilder xContentBuilder) { public abstract int length(); /** - * Slice the bytes from the from index up to length. + * Slice the bytes from the {@code from} index up to {@code length}. */ public abstract BytesReference slice(int from, int length); @@ -156,7 +156,7 @@ public int hashCode() { /** * Returns a compact array from the given BytesReference. The returned array won't be copied unless necessary. If you need - * to modify the returned array use BytesRef.deepCopyOf(reference.toBytesRef() instead + * to modify the returned array use {@code BytesRef.deepCopyOf(reference.toBytesRef()} instead */ public static byte[] toBytes(BytesReference reference) { final BytesRef bytesRef = reference.toBytesRef(); diff --git a/server/src/main/java/org/elasticsearch/common/collect/CopyOnWriteHashMap.java b/server/src/main/java/org/elasticsearch/common/collect/CopyOnWriteHashMap.java index 85d7eda836395..04713f249e887 100644 --- a/server/src/main/java/org/elasticsearch/common/collect/CopyOnWriteHashMap.java +++ b/server/src/main/java/org/elasticsearch/common/collect/CopyOnWriteHashMap.java @@ -85,7 +85,7 @@ private abstract static class Node { /** * Recursively add a new entry to this node. hashBits is * the number of bits that are still set in the hash. When this value - * reaches a number that is less than or equal to 0, a leaf + * reaches a number that is less than or equal to {@code 0}, a leaf * node needs to be created since it means that a collision occurred * on the 32 bits of the hash. */ diff --git a/server/src/main/java/org/elasticsearch/common/component/Lifecycle.java b/server/src/main/java/org/elasticsearch/common/component/Lifecycle.java index 4f0ef4c688763..e71c9b0389995 100644 --- a/server/src/main/java/org/elasticsearch/common/component/Lifecycle.java +++ b/server/src/main/java/org/elasticsearch/common/component/Lifecycle.java @@ -69,28 +69,28 @@ public State state() { } /** - * Returns true if the state is initialized. + * Returns {@code true} if the state is initialized. */ public boolean initialized() { return state == State.INITIALIZED; } /** - * Returns true if the state is started. + * Returns {@code true} if the state is started. */ public boolean started() { return state == State.STARTED; } /** - * Returns true if the state is stopped. + * Returns {@code true} if the state is stopped. */ public boolean stopped() { return state == State.STOPPED; } /** - * Returns true if the state is closed. + * Returns {@code true} if the state is closed. */ public boolean closed() { return state == State.CLOSED; diff --git a/server/src/main/java/org/elasticsearch/common/inject/internal/Strings.java b/server/src/main/java/org/elasticsearch/common/inject/internal/Strings.java index 402158106076e..29a9ce1039189 100644 --- a/server/src/main/java/org/elasticsearch/common/inject/internal/Strings.java +++ b/server/src/main/java/org/elasticsearch/common/inject/internal/Strings.java @@ -41,9 +41,9 @@ private Strings() { *

    * * @param s the string whose first character is to be uppercased - * @return a string equivalent to s with its first character + * @return a string equivalent to {@code s} with its first character * converted to uppercase - * @throws NullPointerException if s is null + * @throws NullPointerException if {@code s} is null */ public static String capitalize(String s) { if (s.length() == 0) { diff --git a/server/src/main/java/org/elasticsearch/common/lease/Releasables.java b/server/src/main/java/org/elasticsearch/common/lease/Releasables.java index 6c928b29a841f..e053f2fd20026 100644 --- a/server/src/main/java/org/elasticsearch/common/lease/Releasables.java +++ b/server/src/main/java/org/elasticsearch/common/lease/Releasables.java @@ -61,7 +61,7 @@ public static void closeWhileHandlingException(Releasable... releasables) { closeWhileHandlingException(Arrays.asList(releasables)); } - /** Release the provided {@link Releasable}s, ignoring exceptions if success is false. */ + /** Release the provided {@link Releasable}s, ignoring exceptions if success is {@code false}. */ public static void close(boolean success, Iterable releasables) { if (success) { close(releasables); @@ -70,7 +70,7 @@ public static void close(boolean success, Iterable releasables) { } } - /** Release the provided {@link Releasable}s, ignoring exceptions if success is false. */ + /** Release the provided {@link Releasable}s, ignoring exceptions if success is {@code false}. */ public static void close(boolean success, Releasable... releasables) { close(success, Arrays.asList(releasables)); } diff --git a/server/src/main/java/org/elasticsearch/common/lucene/Lucene.java b/server/src/main/java/org/elasticsearch/common/lucene/Lucene.java index 5bef7bee4f10b..ebd0d5ba2efba 100644 --- a/server/src/main/java/org/elasticsearch/common/lucene/Lucene.java +++ b/server/src/main/java/org/elasticsearch/common/lucene/Lucene.java @@ -637,9 +637,9 @@ public static final boolean waitForIndex(final Directory directory, final long t } /** - * Returns true iff the given exception or + * Returns {@code true} iff the given exception or * one of it's causes is an instance of {@link CorruptIndexException}, - * {@link IndexFormatTooOldException}, or {@link IndexFormatTooNewException} otherwise false. + * {@link IndexFormatTooOldException}, or {@link IndexFormatTooNewException} otherwise {@code false}. */ public static boolean isCorruptionException(Throwable t) { return ExceptionsHelper.unwrapCorruption(t) != null; diff --git a/server/src/main/java/org/elasticsearch/common/lucene/search/MoreLikeThisQuery.java b/server/src/main/java/org/elasticsearch/common/lucene/search/MoreLikeThisQuery.java index f79f45f3b62bd..394b8bbe65d38 100644 --- a/server/src/main/java/org/elasticsearch/common/lucene/search/MoreLikeThisQuery.java +++ b/server/src/main/java/org/elasticsearch/common/lucene/search/MoreLikeThisQuery.java @@ -287,7 +287,7 @@ public String getMinimumShouldMatch() { /** * Number of terms that must match the generated query expressed in the - * common syntax for minimum should match. Defaults to 30%. + * common syntax for minimum should match. Defaults to {@code 30%}. * * @see org.elasticsearch.common.lucene.search.Queries#calculateMinShouldMatch(int, String) */ diff --git a/server/src/main/java/org/elasticsearch/common/network/NetworkService.java b/server/src/main/java/org/elasticsearch/common/network/NetworkService.java index b9440edd5cf11..7dab3e5256682 100644 --- a/server/src/main/java/org/elasticsearch/common/network/NetworkService.java +++ b/server/src/main/java/org/elasticsearch/common/network/NetworkService.java @@ -66,12 +66,12 @@ public final class NetworkService { */ public interface CustomNameResolver { /** - * Resolves the default value if possible. If not, return null. + * Resolves the default value if possible. If not, return {@code null}. */ InetAddress[] resolveDefault(); /** - * Resolves a custom value handling, return null if can't handle it. + * Resolves a custom value handling, return {@code null} if can't handle it. */ InetAddress[] resolveIfPossible(String value) throws IOException; } diff --git a/server/src/main/java/org/elasticsearch/common/settings/PropertyPlaceholder.java b/server/src/main/java/org/elasticsearch/common/settings/PropertyPlaceholder.java index 2eb7e2b8e70b2..52333d108cfc2 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/PropertyPlaceholder.java +++ b/server/src/main/java/org/elasticsearch/common/settings/PropertyPlaceholder.java @@ -28,7 +28,7 @@ /** * Utility class for working with Strings that have placeholder values in them. A placeholder takes the form - * ${name}. Using PropertyPlaceholder these placeholders can be substituted for + * {@code ${name}}. Using {@code PropertyPlaceholder} these placeholders can be substituted for * user-supplied values. *

    * Values for substitution can be supplied using a {@link Properties} instance or using a diff --git a/server/src/main/java/org/elasticsearch/common/settings/Setting.java b/server/src/main/java/org/elasticsearch/common/settings/Setting.java index d9e42a67671c6..f45f4bda9c9fe 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/Setting.java +++ b/server/src/main/java/org/elasticsearch/common/settings/Setting.java @@ -312,7 +312,7 @@ public boolean isDeprecated() { /** * Returns true iff this setting is a group setting. Group settings represent a set of settings rather than a single value. - * The key, see {@link #getKey()}, in contrast to non-group settings is a prefix like cluster.store. that matches all settings + * The key, see {@link #getKey()}, in contrast to non-group settings is a prefix like {@code cluster.store.} that matches all settings * with this prefix. */ boolean isGroupSetting() { @@ -716,8 +716,8 @@ public void diff(Settings.Builder builder, Settings source, Settings defaultSett } /** - * Returns the namespace for a concrete setting. Ie. an affix setting with prefix: search. and suffix: username - * will return remote as a namespace for the setting search.remote.username + * Returns the namespace for a concrete setting. Ie. an affix setting with prefix: {@code search.} and suffix: {@code username} + * will return {@code remote} as a namespace for the setting {@code search.remote.username} */ public String getNamespace(Setting concreteSetting) { return key.getNamespace(concreteSetting.getKey()); diff --git a/server/src/main/java/org/elasticsearch/common/settings/Settings.java b/server/src/main/java/org/elasticsearch/common/settings/Settings.java index 40f879cb72477..c10cb23371452 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/Settings.java +++ b/server/src/main/java/org/elasticsearch/common/settings/Settings.java @@ -230,7 +230,7 @@ public Settings getAsSettings(String setting) { * Returns the setting value associated with the setting key. * * @param setting The setting key - * @return The setting value, null if it does not exists. + * @return The setting value, {@code null} if it does not exists. */ public String get(String setting) { return toString(settings.get(setting)); @@ -769,8 +769,8 @@ private static void validateValue(String key, Object currentValue, Settings.Buil Collections.unmodifiableSet(new HashSet<>(Arrays.asList("settings_filter", "flat_settings"))); /** - * Returns true if this settings object contains no settings - * @return true if this settings object contains no settings + * Returns {@code true} if this settings object contains no settings + * @return {@code true} if this settings object contains no settings */ public boolean isEmpty() { return this.settings.isEmpty() && (secureSettings == null || secureSettings.getSettingNames().isEmpty()); @@ -1206,7 +1206,7 @@ public Builder putProperties(final Map esSettings, final Functio /** * Runs across all the settings set on this builder and - * replaces ${...} elements in each setting with + * replaces {@code ${...}} elements in each setting with * another setting already set on this builder. */ public Builder replacePropertyPlaceholders() { diff --git a/server/src/main/java/org/elasticsearch/common/unit/ByteSizeUnit.java b/server/src/main/java/org/elasticsearch/common/unit/ByteSizeUnit.java index ec6de176c2f2d..1c0ac61314415 100644 --- a/server/src/main/java/org/elasticsearch/common/unit/ByteSizeUnit.java +++ b/server/src/main/java/org/elasticsearch/common/unit/ByteSizeUnit.java @@ -26,9 +26,9 @@ import java.io.IOException; /** - * A SizeUnit represents size at a given unit of + * A {@code SizeUnit} represents size at a given unit of * granularity and provides utility methods to convert across units. - * A SizeUnit does not maintain size information, but only + * A {@code SizeUnit} does not maintain size information, but only * helps organize and use size representations that may be maintained * separately across various contexts. */ diff --git a/server/src/main/java/org/elasticsearch/common/unit/Fuzziness.java b/server/src/main/java/org/elasticsearch/common/unit/Fuzziness.java index 179870f865349..6fc863ee9e4e6 100644 --- a/server/src/main/java/org/elasticsearch/common/unit/Fuzziness.java +++ b/server/src/main/java/org/elasticsearch/common/unit/Fuzziness.java @@ -105,7 +105,7 @@ public void writeTo(StreamOutput out) throws IOException { } /** - * Creates a {@link Fuzziness} instance from an edit distance. The value must be one of [0, 1, 2] + * Creates a {@link Fuzziness} instance from an edit distance. The value must be one of {@code [0, 1, 2]} * * Note: Using this method only makes sense if the field you are applying Fuzziness to is some sort of string. */ diff --git a/server/src/main/java/org/elasticsearch/common/unit/MemorySizeValue.java b/server/src/main/java/org/elasticsearch/common/unit/MemorySizeValue.java index 2830d8318a343..939664dd4d65a 100644 --- a/server/src/main/java/org/elasticsearch/common/unit/MemorySizeValue.java +++ b/server/src/main/java/org/elasticsearch/common/unit/MemorySizeValue.java @@ -31,8 +31,8 @@ public enum MemorySizeValue { ; /** Parse the provided string as a memory size. This method either accepts absolute values such as - * 42 (default assumed unit is byte) or 2mb, or percentages of the heap size: if - * the heap is 1G, 10% will be parsed as 100mb. */ + * {@code 42} (default assumed unit is byte) or {@code 2mb}, or percentages of the heap size: if + * the heap is 1G, {@code 10%} will be parsed as {@code 100mb}. */ public static ByteSizeValue parseBytesSizeValueOrHeapRatio(String sValue, String settingName) { settingName = Objects.requireNonNull(settingName); if (sValue != null && sValue.endsWith("%")) { diff --git a/server/src/main/java/org/elasticsearch/common/util/ArrayUtils.java b/server/src/main/java/org/elasticsearch/common/util/ArrayUtils.java index 20c12d564da62..1d641a4a7546b 100644 --- a/server/src/main/java/org/elasticsearch/common/util/ArrayUtils.java +++ b/server/src/main/java/org/elasticsearch/common/util/ArrayUtils.java @@ -27,7 +27,7 @@ public class ArrayUtils { private ArrayUtils() {} /** - * Return the index of value in array, or -1 if there is no such index. + * Return the index of value in array, or {@code -1} if there is no such index. * If there are several values that are within tolerance or less of value, this method will return the * index of the closest value. In case of several values being as close ot value, there is no guarantee which index * will be returned. diff --git a/server/src/main/java/org/elasticsearch/common/util/concurrent/RefCounted.java b/server/src/main/java/org/elasticsearch/common/util/concurrent/RefCounted.java index 8ffbbc9b6e461..b2cc8b99c63de 100644 --- a/server/src/main/java/org/elasticsearch/common/util/concurrent/RefCounted.java +++ b/server/src/main/java/org/elasticsearch/common/util/concurrent/RefCounted.java @@ -49,7 +49,7 @@ public interface RefCounted { void incRef(); /** - * Tries to increment the refCount of this instance. This method will return true iff the refCount was + * Tries to increment the refCount of this instance. This method will return {@code true} iff the refCount was * * @see #decRef() * @see #incRef() diff --git a/server/src/main/java/org/elasticsearch/discovery/zen/ElectMasterService.java b/server/src/main/java/org/elasticsearch/discovery/zen/ElectMasterService.java index 024c50fb6e090..ebce175e98118 100644 --- a/server/src/main/java/org/elasticsearch/discovery/zen/ElectMasterService.java +++ b/server/src/main/java/org/elasticsearch/discovery/zen/ElectMasterService.java @@ -134,7 +134,7 @@ public boolean hasEnoughCandidates(Collection candidates) { } /** - * Elects a new master out of the possible nodes, returning it. Returns null + * Elects a new master out of the possible nodes, returning it. Returns {@code null} * if no master has been elected. */ public MasterCandidate electMaster(Collection candidates) { diff --git a/server/src/main/java/org/elasticsearch/gateway/MetaDataStateFormat.java b/server/src/main/java/org/elasticsearch/gateway/MetaDataStateFormat.java index b6c8d411474c9..f6c190fee0922 100644 --- a/server/src/main/java/org/elasticsearch/gateway/MetaDataStateFormat.java +++ b/server/src/main/java/org/elasticsearch/gateway/MetaDataStateFormat.java @@ -90,7 +90,7 @@ protected MetaDataStateFormat(String prefix) { * Writes the given state to the given directories. The state is written to a * state directory ({@value #STATE_DIR_NAME}) underneath each of the given file locations and is created if it * doesn't exist. The state is serialized to a temporary file in that directory and is then atomically moved to - * it's target filename of the pattern {prefix}{version}.st. + * it's target filename of the pattern {@code {prefix}{version}.st}. * * @param state the state object to write * @param locations the locations where the state should be written to. diff --git a/server/src/main/java/org/elasticsearch/index/IndexModule.java b/server/src/main/java/org/elasticsearch/index/IndexModule.java index 767ef48733937..99a5f73c15088 100644 --- a/server/src/main/java/org/elasticsearch/index/IndexModule.java +++ b/server/src/main/java/org/elasticsearch/index/IndexModule.java @@ -72,7 +72,7 @@ *

  • {@link Similarity} - New {@link Similarity} implementations can be registered through * {@link #addSimilarity(String, TriFunction)} while existing Providers can be referenced through Settings under the * {@link IndexModule#SIMILARITY_SETTINGS_PREFIX} prefix along with the "type" value. For example, to reference the - * {@link BM25Similarity}, the configuration "index.similarity.my_similarity.type : "BM25" can be used.
  • + * {@link BM25Similarity}, the configuration {@code "index.similarity.my_similarity.type : "BM25"} can be used. *
  • {@link IndexStore} - Custom {@link IndexStore} instances can be registered via {@link #addIndexStore(String, Function)}
  • *
  • {@link IndexEventListener} - Custom {@link IndexEventListener} instances can be registered via * {@link #addIndexEventListener(IndexEventListener)}
  • diff --git a/server/src/main/java/org/elasticsearch/index/IndexSettings.java b/server/src/main/java/org/elasticsearch/index/IndexSettings.java index 9a3a5512c6c1e..7d1e9a2597944 100644 --- a/server/src/main/java/org/elasticsearch/index/IndexSettings.java +++ b/server/src/main/java/org/elasticsearch/index/IndexSettings.java @@ -619,7 +619,7 @@ public TimeValue getTranslogSyncInterval() { } /** - * Returns this interval in which the shards of this index are asynchronously refreshed. -1 means async refresh is disabled. + * Returns this interval in which the shards of this index are asynchronously refreshed. {@code -1} means async refresh is disabled. */ public TimeValue getRefreshInterval() { return refreshInterval; diff --git a/server/src/main/java/org/elasticsearch/index/engine/Engine.java b/server/src/main/java/org/elasticsearch/index/engine/Engine.java index 1b8b7d75c2eb8..33913ff71141b 100644 --- a/server/src/main/java/org/elasticsearch/index/engine/Engine.java +++ b/server/src/main/java/org/elasticsearch/index/engine/Engine.java @@ -112,7 +112,7 @@ public abstract class Engine implements Closeable { protected final ReleasableLock writeLock = new ReleasableLock(rwl.writeLock()); protected final SetOnce failedEngine = new SetOnce<>(); /* - * on lastWriteNanos we use System.nanoTime() to initialize this since: + * on {@code lastWriteNanos} we use System.nanoTime() to initialize this since: * - we use the value for figuring out if the shard / engine is active so if we startup and no write has happened yet we still consider it active * for the duration of the configured active to inactive period. If we initialize to 0 or Long.MAX_VALUE we either immediately or never mark it * inactive if no writes at all happen to the shard. diff --git a/server/src/main/java/org/elasticsearch/index/fielddata/FieldData.java b/server/src/main/java/org/elasticsearch/index/fielddata/FieldData.java index eb569aa4c2ba8..b5e1608957e4c 100644 --- a/server/src/main/java/org/elasticsearch/index/fielddata/FieldData.java +++ b/server/src/main/java/org/elasticsearch/index/fielddata/FieldData.java @@ -285,7 +285,7 @@ public static BinaryDocValues unwrapSingleton(SortedBinaryDocValues values) { /** * Returns whether the provided values *might* be multi-valued. There is no - * guarantee that this method will return false in the single-valued case. + * guarantee that this method will return {@code false} in the single-valued case. */ public static boolean isMultiValued(SortedSetDocValues values) { return DocValues.unwrapSingleton(values) == null; @@ -293,7 +293,7 @@ public static boolean isMultiValued(SortedSetDocValues values) { /** * Returns whether the provided values *might* be multi-valued. There is no - * guarantee that this method will return false in the single-valued case. + * guarantee that this method will return {@code false} in the single-valued case. */ public static boolean isMultiValued(SortedNumericDocValues values) { return DocValues.unwrapSingleton(values) == null; @@ -301,7 +301,7 @@ public static boolean isMultiValued(SortedNumericDocValues values) { /** * Returns whether the provided values *might* be multi-valued. There is no - * guarantee that this method will return false in the single-valued case. + * guarantee that this method will return {@code false} in the single-valued case. */ public static boolean isMultiValued(SortedNumericDoubleValues values) { return unwrapSingleton(values) == null; @@ -309,7 +309,7 @@ public static boolean isMultiValued(SortedNumericDoubleValues values) { /** * Returns whether the provided values *might* be multi-valued. There is no - * guarantee that this method will return false in the single-valued case. + * guarantee that this method will return {@code false} in the single-valued case. */ public static boolean isMultiValued(SortedBinaryDocValues values) { return unwrapSingleton(values) != null; @@ -317,7 +317,7 @@ public static boolean isMultiValued(SortedBinaryDocValues values) { /** * Returns whether the provided values *might* be multi-valued. There is no - * guarantee that this method will return false in the single-valued case. + * guarantee that this method will return {@code false} in the single-valued case. */ public static boolean isMultiValued(MultiGeoPointValues values) { return unwrapSingleton(values) == null; diff --git a/server/src/main/java/org/elasticsearch/index/fielddata/ordinals/OrdinalsBuilder.java b/server/src/main/java/org/elasticsearch/index/fielddata/ordinals/OrdinalsBuilder.java index b2e1b9e3104fb..a2baf1fee6c0b 100644 --- a/server/src/main/java/org/elasticsearch/index/fielddata/ordinals/OrdinalsBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/fielddata/ordinals/OrdinalsBuilder.java @@ -38,7 +38,7 @@ /** * Simple class to build document ID <-> ordinal mapping. Note: Ordinals are - * 1 based monotonically increasing positive integers. 0 + * {@code 1} based monotonically increasing positive integers. {@code 0} * donates the missing value in this context. */ public final class OrdinalsBuilder implements Closeable { @@ -318,7 +318,7 @@ public long nextOrdinal() { } /** - * Returns the current ordinal or 0 if this build has not been advanced via + * Returns the current ordinal or {@code 0} if this build has not been advanced via * {@link #nextOrdinal()}. */ public long currentOrdinal() { @@ -423,7 +423,7 @@ public int maxDoc() { * This method iterates all terms in the given {@link TermsEnum} and * associates each terms ordinal with the terms documents. The caller must * exhaust the returned {@link BytesRefIterator} which returns all values - * where the first returned value is associated with the ordinal 1 + * where the first returned value is associated with the ordinal {@code 1} * etc. */ public BytesRefIterator buildFromTerms(final TermsEnum termsEnum) throws IOException { diff --git a/server/src/main/java/org/elasticsearch/index/mapper/ContentPath.java b/server/src/main/java/org/elasticsearch/index/mapper/ContentPath.java index 6ab9019e8493f..3c67d3ee7f31c 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/ContentPath.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/ContentPath.java @@ -36,7 +36,7 @@ public ContentPath() { } /** - * Constructs a json path with an offset. The offset will result an offset + * Constructs a json path with an offset. The offset will result an {@code offset} * number of path elements to not be included in {@link #pathAsText(String)}. */ public ContentPath(int offset) { diff --git a/server/src/main/java/org/elasticsearch/index/mapper/MappedFieldType.java b/server/src/main/java/org/elasticsearch/index/mapper/MappedFieldType.java index 9af406108688b..708be4c3f2328 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/MappedFieldType.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/MappedFieldType.java @@ -404,7 +404,7 @@ public Relation isFieldWithinQuery( return Relation.INTERSECTS; } - /** A term query to use when parsing a query string. Can return null. */ + /** A term query to use when parsing a query string. Can return {@code null}. */ @Nullable public Query queryStringTermQuery(Term term) { return null; diff --git a/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java b/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java index 8f73778f5b20d..d3132d4da74ec 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java @@ -618,7 +618,7 @@ public final boolean includeInAll(Boolean includeInAll, FieldMapper mapper) { /** * Is all included or not. Will always disable it if {@link org.elasticsearch.index.mapper.AllFieldMapper#enabled()} - * is false. If its enabled, then will return true only if the specific flag is null or + * is {@code false}. If its enabled, then will return {@code true} only if the specific flag is {@code null} or * its actual value (so, if not set, defaults to "true") and the field is indexed. */ private boolean includeInAll(Boolean includeInAll, boolean indexed) { diff --git a/server/src/main/java/org/elasticsearch/index/query/AbstractQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/AbstractQueryBuilder.java index 942c72f22935b..7e667af054452 100644 --- a/server/src/main/java/org/elasticsearch/index/query/AbstractQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/AbstractQueryBuilder.java @@ -226,7 +226,7 @@ static Object maybeConvertToString(Object obj) { /** * Helper method to convert collection of {@link QueryBuilder} instances to lucene - * {@link Query} instances. {@link QueryBuilder} that return null calling + * {@link Query} instances. {@link QueryBuilder} that return {@code null} calling * their {@link QueryBuilder#toQuery(QueryShardContext)} method are not added to the * resulting collection. */ diff --git a/server/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java index 58697d9ada5ac..be5fca365d892 100644 --- a/server/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java @@ -112,7 +112,7 @@ protected void doWriteTo(StreamOutput out) throws IOException { /** * Adds a query that must appear in the matching documents and will - * contribute to scoring. No null value allowed. + * contribute to scoring. No {@code null} value allowed. */ public BoolQueryBuilder must(QueryBuilder queryBuilder) { if (queryBuilder == null) { @@ -131,7 +131,7 @@ public List must() { /** * Adds a query that must appear in the matching documents but will - * not contribute to scoring. No null value allowed. + * not contribute to scoring. No {@code null} value allowed. */ public BoolQueryBuilder filter(QueryBuilder queryBuilder) { if (queryBuilder == null) { @@ -150,7 +150,7 @@ public List filter() { /** * Adds a query that must not appear in the matching documents. - * No null value allowed. + * No {@code null} value allowed. */ public BoolQueryBuilder mustNot(QueryBuilder queryBuilder) { if (queryBuilder == null) { @@ -169,8 +169,8 @@ public List mustNot() { /** * Adds a clause that should be matched by the returned documents. For a boolean query with no - * MUST clauses one or more SHOULD clauses must match a document - * for the BooleanQuery to match. No null value allowed. + * {@code MUST} clauses one or more SHOULD clauses must match a document + * for the BooleanQuery to match. No {@code null} value allowed. * * @see #minimumShouldMatch(int) */ diff --git a/server/src/main/java/org/elasticsearch/index/query/CommonTermsQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/CommonTermsQueryBuilder.java index c0c08e654807f..974466a3161f3 100644 --- a/server/src/main/java/org/elasticsearch/index/query/CommonTermsQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/CommonTermsQueryBuilder.java @@ -143,7 +143,7 @@ public Object value() { /** * Sets the operator to use for terms with a high document frequency * (greater than or equal to {@link #cutoffFrequency(float)}. Defaults to - * AND. + * {@code AND}. */ public CommonTermsQueryBuilder highFreqOperator(Operator operator) { this.highFreqOperator = (operator == null) ? DEFAULT_HIGH_FREQ_OCCUR : operator; @@ -156,7 +156,7 @@ public Operator highFreqOperator() { /** * Sets the operator to use for terms with a low document frequency (less - * than {@link #cutoffFrequency(float)}. Defaults to AND. + * than {@link #cutoffFrequency(float)}. Defaults to {@code AND}. */ public CommonTermsQueryBuilder lowFreqOperator(Operator operator) { this.lowFreqOperator = (operator == null) ? DEFAULT_LOW_FREQ_OCCUR : operator; @@ -185,7 +185,7 @@ public String analyzer() { * in [0..1] (or absolute number >=1) representing the maximum threshold of * a terms document frequency to be considered a low frequency term. * Defaults to - * {@value #DEFAULT_CUTOFF_FREQ} + * {@code {@value #DEFAULT_CUTOFF_FREQ}} */ public CommonTermsQueryBuilder cutoffFrequency(float cutoffFrequency) { this.cutoffFrequency = cutoffFrequency; diff --git a/server/src/main/java/org/elasticsearch/index/query/MatchPhrasePrefixQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/MatchPhrasePrefixQueryBuilder.java index 0e90ba5ae575b..8c24c3eea7a2e 100644 --- a/server/src/main/java/org/elasticsearch/index/query/MatchPhrasePrefixQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/MatchPhrasePrefixQueryBuilder.java @@ -101,7 +101,7 @@ public MatchPhrasePrefixQueryBuilder analyzer(String analyzer) { return this; } - /** Get the analyzer to use, if previously set, otherwise null */ + /** Get the analyzer to use, if previously set, otherwise {@code null} */ public String analyzer() { return this.analyzer; } diff --git a/server/src/main/java/org/elasticsearch/index/query/MatchPhraseQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/MatchPhraseQueryBuilder.java index 41e0dd8ffa0cb..445720cb934ca 100644 --- a/server/src/main/java/org/elasticsearch/index/query/MatchPhraseQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/MatchPhraseQueryBuilder.java @@ -108,7 +108,7 @@ public MatchPhraseQueryBuilder analyzer(String analyzer) { return this; } - /** Get the analyzer to use, if previously set, otherwise null */ + /** Get the analyzer to use, if previously set, otherwise {@code null} */ public String analyzer() { return this.analyzer; } diff --git a/server/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java index 3895aeab0f3da..bf40a20170172 100644 --- a/server/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java @@ -171,7 +171,7 @@ public Object value() { return this.value; } - /** Sets the operator to use when using a boolean query. Defaults to OR. */ + /** Sets the operator to use when using a boolean query. Defaults to {@code OR}. */ public MatchQueryBuilder operator(Operator operator) { if (operator == null) { throw new IllegalArgumentException("[" + NAME + "] requires operator to be non-null"); @@ -194,7 +194,7 @@ public MatchQueryBuilder analyzer(String analyzer) { return this; } - /** Get the analyzer to use, if previously set, otherwise null */ + /** Get the analyzer to use, if previously set, otherwise {@code null} */ public String analyzer() { return this.analyzer; } @@ -258,7 +258,7 @@ public MatchQueryBuilder cutoffFrequency(float cutoff) { return this; } - /** Gets the optional cutoff value, can be null if not set previously */ + /** Gets the optional cutoff value, can be {@code null} if not set previously */ public Float cutoffFrequency() { return this.cutoffFrequency; } @@ -357,7 +357,7 @@ public MatchQueryBuilder autoGenerateSynonymsPhraseQuery(boolean enable) { /** * Whether phrase queries should be automatically generated for multi terms synonyms. - * Defaults to true. + * Defaults to {@code true}. */ public boolean autoGenerateSynonymsPhraseQuery() { return autoGenerateSynonymsPhraseQuery; diff --git a/server/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryBuilder.java index 412d65b3a984f..73b4ad9bd03a4 100644 --- a/server/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryBuilder.java @@ -596,7 +596,7 @@ public Item[] unlikeItems() { /** * Sets the maximum number of query terms that will be included in any generated query. - * Defaults to 25. + * Defaults to {@code 25}. */ public MoreLikeThisQueryBuilder maxQueryTerms(int maxQueryTerms) { this.maxQueryTerms = maxQueryTerms; @@ -609,7 +609,7 @@ public int maxQueryTerms() { /** * The frequency below which terms will be ignored in the source doc. The default - * frequency is 2. + * frequency is {@code 2}. */ public MoreLikeThisQueryBuilder minTermFreq(int minTermFreq) { this.minTermFreq = minTermFreq; @@ -622,7 +622,7 @@ public int minTermFreq() { /** * Sets the frequency at which words will be ignored which do not occur in at least this - * many docs. Defaults to 5. + * many docs. Defaults to {@code 5}. */ public MoreLikeThisQueryBuilder minDocFreq(int minDocFreq) { this.minDocFreq = minDocFreq; @@ -648,7 +648,7 @@ public int maxDocFreq() { /** * Sets the minimum word length below which words will be ignored. Defaults - * to 0. + * to {@code 0}. */ public MoreLikeThisQueryBuilder minWordLength(int minWordLength) { this.minWordLength = minWordLength; @@ -661,7 +661,7 @@ public int minWordLength() { /** * Sets the maximum word length above which words will be ignored. Defaults to - * unbounded (0). + * unbounded ({@code 0}). */ public MoreLikeThisQueryBuilder maxWordLength(int maxWordLength) { this.maxWordLength = maxWordLength; @@ -710,7 +710,7 @@ public String analyzer() { /** * Number of terms that must match the generated query expressed in the - * common syntax for minimum should match. Defaults to 30%. + * common syntax for minimum should match. Defaults to {@code 30%}. * * @see org.elasticsearch.common.lucene.search.Queries#calculateMinShouldMatch(int, String) */ @@ -727,7 +727,7 @@ public String minimumShouldMatch() { } /** - * Sets the boost factor to use when boosting terms. Defaults to 0 (deactivated). + * Sets the boost factor to use when boosting terms. Defaults to {@code 0} (deactivated). */ public MoreLikeThisQueryBuilder boostTerms(float boostTerms) { this.boostTerms = boostTerms; @@ -739,7 +739,7 @@ public float boostTerms() { } /** - * Whether to include the input documents. Defaults to false + * Whether to include the input documents. Defaults to {@code false} */ public MoreLikeThisQueryBuilder include(boolean include) { this.include = include; diff --git a/server/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java index e56fd44f5b856..d8ad16f3af052 100644 --- a/server/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java @@ -337,7 +337,7 @@ public Type type() { } /** - * Sets the operator to use when using a boolean query. Defaults to OR. + * Sets the operator to use when using a boolean query. Defaults to {@code OR}. */ public MultiMatchQueryBuilder operator(Operator operator) { if (operator == null) { @@ -460,7 +460,7 @@ public Boolean useDisMax() { * match only the best of the fields, without confusing this with the better case of * two distinct matches in the multiple fields.

    * - *

    A tie-breaker value of 1.0 is interpreted as a signal to score queries as + *

    A tie-breaker value of {@code 1.0} is interpreted as a signal to score queries as * "most-match" queries where all matching query clauses are considered for scoring.

    * * @see Type @@ -477,7 +477,7 @@ public MultiMatchQueryBuilder tieBreaker(float tieBreaker) { * match only the best of the fields, without confusing this with the better case of * two distinct matches in the multiple fields.

    * - *

    A tie-breaker value of 1.0 is interpreted as a signal to score queries as + *

    A tie-breaker value of {@code 1.0} is interpreted as a signal to score queries as * "most-match" queries where all matching query clauses are considered for scoring.

    * * @see Type @@ -546,7 +546,7 @@ public MultiMatchQueryBuilder autoGenerateSynonymsPhraseQuery(boolean enable) { /** * Whether phrase queries should be automatically generated for multi terms synonyms. - * Defaults to true. + * Defaults to {@code true}. */ public boolean autoGenerateSynonymsPhraseQuery() { return autoGenerateSynonymsPhraseQuery; diff --git a/server/src/main/java/org/elasticsearch/index/query/QueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/QueryBuilder.java index f8f5b68be9afb..5b765c5cbda5d 100644 --- a/server/src/main/java/org/elasticsearch/index/query/QueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/QueryBuilder.java @@ -29,21 +29,21 @@ public interface QueryBuilder extends NamedWriteable, ToXContentObject, Rewritea /** * Converts this QueryBuilder to a lucene {@link Query}. - * Returns null if this query should be ignored in the context of + * Returns {@code null} if this query should be ignored in the context of * parent queries. * * @param context additional information needed to construct the queries - * @return the {@link Query} or null if this query should be ignored upstream + * @return the {@link Query} or {@code null} if this query should be ignored upstream */ Query toQuery(QueryShardContext context) throws IOException; /** * Converts this QueryBuilder to an unscored lucene {@link Query} that acts as a filter. - * Returns null if this query should be ignored in the context of + * Returns {@code null} if this query should be ignored in the context of * parent queries. * * @param context additional information needed to construct the queries - * @return the {@link Query} or null if this query should be ignored upstream + * @return the {@link Query} or {@code null} if this query should be ignored upstream */ Query toFilter(QueryShardContext context) throws IOException; diff --git a/server/src/main/java/org/elasticsearch/index/query/QueryBuilders.java b/server/src/main/java/org/elasticsearch/index/query/QueryBuilders.java index cf8e6e57e0ca0..43fd89b8be335 100644 --- a/server/src/main/java/org/elasticsearch/index/query/QueryBuilders.java +++ b/server/src/main/java/org/elasticsearch/index/query/QueryBuilders.java @@ -240,12 +240,12 @@ public static RangeQueryBuilder rangeQuery(String name) { } /** - * Implements the wildcard search query. Supported wildcards are *, which - * matches any character sequence (including the empty one), and ?, + * Implements the wildcard search query. Supported wildcards are {@code *}, which + * matches any character sequence (including the empty one), and {@code ?}, * which matches any single character. Note this query can be slow, as it * needs to iterate over many terms. In order to prevent extremely slow WildcardQueries, - * a Wildcard term should not start with one of the wildcards * or - * ?. + * a Wildcard term should not start with one of the wildcards {@code *} or + * {@code ?}. * * @param name The field name * @param query The wildcard query string diff --git a/server/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java index 154933dc85baa..e11ae63528ee6 100644 --- a/server/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java @@ -474,7 +474,7 @@ public int maxDeterminizedStates() { } /** - * Should leading wildcards be allowed or not. Defaults to true. + * Should leading wildcards be allowed or not. Defaults to {@code true}. */ public QueryStringQueryBuilder allowLeadingWildcard(Boolean allowLeadingWildcard) { this.allowLeadingWildcard = allowLeadingWildcard; @@ -486,8 +486,8 @@ public Boolean allowLeadingWildcard() { } /** - * Set to true to enable position increments in result query. Defaults to - * true. + * Set to {@code true} to enable position increments in result query. Defaults to + * {@code true}. *

    * When set, result phrase and multi-phrase queries will be aware of position increments. * Useful when e.g. a StopFilter increases the position increment of the token that follows an omitted token. @@ -562,7 +562,7 @@ public QueryStringQueryBuilder rewrite(String rewrite) { } /** - * Set to true to enable analysis on wildcard and prefix queries. + * Set to {@code true} to enable analysis on wildcard and prefix queries. */ public QueryStringQueryBuilder analyzeWildcard(Boolean analyzeWildcard) { this.analyzeWildcard = analyzeWildcard; @@ -633,7 +633,7 @@ public DateTimeZone timeZone() { } /** - * Set to true to enable escaping of the query string + * Set to {@code true} to enable escaping of the query string */ public QueryStringQueryBuilder escape(boolean escape) { this.escape = escape; @@ -667,7 +667,7 @@ public QueryStringQueryBuilder autoGenerateSynonymsPhraseQuery(boolean value) { /** * Whether phrase queries should be automatically generated for multi terms synonyms. - * Defaults to true. + * Defaults to {@code true}. */ public boolean autoGenerateSynonymsPhraseQuery() { return autoGenerateSynonymsPhraseQuery; diff --git a/server/src/main/java/org/elasticsearch/index/query/RangeQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/RangeQueryBuilder.java index 48f7f9335ab13..6223254874d07 100644 --- a/server/src/main/java/org/elasticsearch/index/query/RangeQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/RangeQueryBuilder.java @@ -236,7 +236,7 @@ public RangeQueryBuilder lte(Object to) { } /** - * Should the lower bound be included or not. Defaults to true. + * Should the lower bound be included or not. Defaults to {@code true}. */ public RangeQueryBuilder includeLower(boolean includeLower) { this.includeLower = includeLower; @@ -251,7 +251,7 @@ public boolean includeLower() { } /** - * Should the upper bound be included or not. Defaults to true. + * Should the upper bound be included or not. Defaults to {@code true}. */ public RangeQueryBuilder includeUpper(boolean includeUpper) { this.includeUpper = includeUpper; diff --git a/server/src/main/java/org/elasticsearch/index/query/RegexpFlag.java b/server/src/main/java/org/elasticsearch/index/query/RegexpFlag.java index e00c19b68b587..669c885276f46 100644 --- a/server/src/main/java/org/elasticsearch/index/query/RegexpFlag.java +++ b/server/src/main/java/org/elasticsearch/index/query/RegexpFlag.java @@ -26,13 +26,13 @@ /** * Regular expression syntax flags. Each flag represents optional syntax support in the regular expression: *

      - *
    • INTERSECTION - Support for intersection notation: <expression> & <expression>
    • - *
    • COMPLEMENT - Support for complement notation: <expression> & <expression>
    • - *
    • EMPTY - Support for the empty language symbol: #
    • - *
    • ANYSTRING - Support for the any string symbol: @
    • - *
    • INTERVAL - Support for numerical interval notation: <n-m>
    • - *
    • NONE - Disable support for all syntax options
    • - *
    • ALL - Enables support for all syntax options
    • + *
    • {@code INTERSECTION} - Support for intersection notation: {@code <expression> & <expression>}
    • + *
    • {@code COMPLEMENT} - Support for complement notation: {@code <expression> & <expression>}
    • + *
    • {@code EMPTY} - Support for the empty language symbol: {@code #}
    • + *
    • {@code ANYSTRING} - Support for the any string symbol: {@code @}
    • + *
    • {@code INTERVAL} - Support for numerical interval notation: {@code <n-m>}
    • + *
    • {@code NONE} - Disable support for all syntax options
    • + *
    • {@code ALL} - Enables support for all syntax options
    • *
    * * @see RegexpQueryBuilder#flags(RegexpFlag...) @@ -41,27 +41,27 @@ public enum RegexpFlag { /** - * Enables intersection of the form: <expression> & <expression> + * Enables intersection of the form: {@code <expression> & <expression>} */ INTERSECTION(RegExp.INTERSECTION), /** - * Enables complement expression of the form: ~<expression> + * Enables complement expression of the form: {@code ~<expression>} */ COMPLEMENT(RegExp.COMPLEMENT), /** - * Enables empty language expression: # + * Enables empty language expression: {@code #} */ EMPTY(RegExp.EMPTY), /** - * Enables any string expression: @ + * Enables any string expression: {@code @} */ ANYSTRING(RegExp.ANYSTRING), /** - * Enables numerical interval expression: <n-m> + * Enables numerical interval expression: {@code <n-m>} */ INTERVAL(RegExp.INTERVAL), @@ -90,9 +90,9 @@ public int value() { * Resolves the combined OR'ed value for the given list of regular expression flags. The given flags must follow the * following syntax: *

    - * flag_name(|flag_name)* + * {@code flag_name}(|{@code flag_name})* *

    - * Where flag_name is one of the following: + * Where {@code flag_name} is one of the following: *

      *
    • INTERSECTION
    • *
    • COMPLEMENT
    • @@ -103,7 +103,7 @@ public int value() { *
    • ALL
    • *
    *

    - * Example: INTERSECTION|COMPLEMENT|EMPTY + * Example: {@code INTERSECTION|COMPLEMENT|EMPTY} * * @param flags A string representing a list of regular expression flags * @return The combined OR'ed value for all the flags diff --git a/server/src/main/java/org/elasticsearch/index/query/SimpleQueryStringBuilder.java b/server/src/main/java/org/elasticsearch/index/query/SimpleQueryStringBuilder.java index 59e09b6c39f4d..fe53fc355578a 100644 --- a/server/src/main/java/org/elasticsearch/index/query/SimpleQueryStringBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/SimpleQueryStringBuilder.java @@ -51,14 +51,14 @@ * won't throw exceptions for any weird string syntax. It supports * the following: *

      - *
    • '{@code +}' specifies {@code AND} operation: token1+token2 - *
    • '{@code |}' specifies {@code OR} operation: token1|token2 - *
    • '{@code -}' negates a single token: -token0 - *
    • '{@code "}' creates phrases of terms: "term1 term2 ..." - *
    • '{@code *}' at the end of terms specifies prefix query: term* - *
    • '{@code (}' and '{@code)}' specifies precedence: token1 + (token2 | token3) - *
    • '{@code ~}N' at the end of terms specifies fuzzy query: term~1 - *
    • '{@code ~}N' at the end of phrases specifies near/slop query: "term1 term2"~5 + *
    • '{@code +}' specifies {@code AND} operation: {@code token1+token2} + *
    • '{@code |}' specifies {@code OR} operation: {@code token1|token2} + *
    • '{@code -}' negates a single token: {@code -token0} + *
    • '{@code "}' creates phrases of terms: {@code "term1 term2 ..."} + *
    • '{@code *}' at the end of terms specifies prefix query: {@code term*} + *
    • '{@code (}' and '{@code)}' specifies precedence: {@code token1 + (token2 | token3)} + *
    • '{@code ~}N' at the end of terms specifies fuzzy query: {@code term~1} + *
    • '{@code ~}N' at the end of phrases specifies near/slop query: {@code "term1 term2"~5} *
    *

    * See: {@link SimpleQueryStringQueryParser} for more information. @@ -406,7 +406,7 @@ public SimpleQueryStringBuilder autoGenerateSynonymsPhraseQuery(boolean value) { /** * Whether phrase queries should be automatically generated for multi terms synonyms. - * Defaults to true. + * Defaults to {@code true}. */ public boolean autoGenerateSynonymsPhraseQuery() { return settings.autoGenerateSynonymsPhraseQuery(); diff --git a/server/src/main/java/org/elasticsearch/index/query/WildcardQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/WildcardQueryBuilder.java index 351cddd59004f..96782dac0b8da 100644 --- a/server/src/main/java/org/elasticsearch/index/query/WildcardQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/WildcardQueryBuilder.java @@ -42,12 +42,12 @@ import java.util.Objects; /** - * Implements the wildcard search query. Supported wildcards are *, which - * matches any character sequence (including the empty one), and ?, + * Implements the wildcard search query. Supported wildcards are {@code *}, which + * matches any character sequence (including the empty one), and {@code ?}, * which matches any single character. Note this query can be slow, as it * needs to iterate over many terms. In order to prevent extremely slow WildcardQueries, - * a Wildcard term should not start with one of the wildcards * or - * ?. + * a Wildcard term should not start with one of the wildcards {@code *} or + * {@code ?}. */ public class WildcardQueryBuilder extends AbstractQueryBuilder implements MultiTermQueryBuilder { public static final String NAME = "wildcard"; @@ -63,12 +63,12 @@ public class WildcardQueryBuilder extends AbstractQueryBuilder*, which - * matches any character sequence (including the empty one), and ?, + * Implements the wildcard search query. Supported wildcards are {@code *}, which + * matches any character sequence (including the empty one), and {@code ?}, * which matches any single character. Note this query can be slow, as it * needs to iterate over many terms. In order to prevent extremely slow WildcardQueries, - * a Wildcard term should not start with one of the wildcards * or - * ?. + * a Wildcard term should not start with one of the wildcards {@code *} or + * {@code ?}. * * @param fieldName The field name * @param value The wildcard query string diff --git a/server/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequest.java b/server/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequest.java index 20f87e047b6a3..aa8543175d9f0 100644 --- a/server/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequest.java +++ b/server/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequest.java @@ -33,13 +33,13 @@ * * Delete-by-query now has the following semantics: *

      - *
    • it's non-atomic, a delete-by-query may fail at any time while some documents matching the query have already been + *
    • it's {@code non-atomic}, a delete-by-query may fail at any time while some documents matching the query have already been * deleted
    • - *
    • it's syntactic sugar, a delete-by-query is equivalent to a scroll search and corresponding bulk-deletes by ID
    • - *
    • it's executed on a point-in-time snapshot, a delete-by-query will only delete the documents that are visible at the + *
    • it's {@code syntactic sugar}, a delete-by-query is equivalent to a scroll search and corresponding bulk-deletes by ID
    • + *
    • it's executed on a {@code point-in-time} snapshot, a delete-by-query will only delete the documents that are visible at the * point in time the delete-by-query was started, equivalent to the scroll API
    • - *
    • it's consistent, a delete-by-query will yield consistent results across all replicas of a shard
    • - *
    • it's forward-compatible, a delete-by-query will only send IDs to the shards as deletes such that no queries are + *
    • it's {@code consistent}, a delete-by-query will yield consistent results across all replicas of a shard
    • + *
    • it's {@code forward-compatible}, a delete-by-query will only send IDs to the shards as deletes such that no queries are * stored in the transaction logs that might not be supported in the future.
    • *
    • it's results won't be visible until the index is refreshed.
    • *
    diff --git a/server/src/main/java/org/elasticsearch/index/search/SimpleQueryStringQueryParser.java b/server/src/main/java/org/elasticsearch/index/search/SimpleQueryStringQueryParser.java index 2f221aa0244eb..912e03ca7996c 100644 --- a/server/src/main/java/org/elasticsearch/index/search/SimpleQueryStringQueryParser.java +++ b/server/src/main/java/org/elasticsearch/index/search/SimpleQueryStringQueryParser.java @@ -359,7 +359,7 @@ public void autoGenerateSynonymsPhraseQuery(boolean value) { /** * Whether phrase queries should be automatically generated for multi terms synonyms. - * Defaults to true. + * Defaults to {@code true}. */ public boolean autoGenerateSynonymsPhraseQuery() { return autoGenerateSynonymsPhraseQuery; diff --git a/server/src/main/java/org/elasticsearch/index/search/stats/ShardSearchStats.java b/server/src/main/java/org/elasticsearch/index/search/stats/ShardSearchStats.java index 636977029107e..342b638db3104 100644 --- a/server/src/main/java/org/elasticsearch/index/search/stats/ShardSearchStats.java +++ b/server/src/main/java/org/elasticsearch/index/search/stats/ShardSearchStats.java @@ -42,7 +42,7 @@ public final class ShardSearchStats implements SearchOperationListener { /** * Returns the stats, including group specific stats. If the groups are null/0 length, then nothing * is returned for them. If they are set, then only groups provided will be returned, or - * _all for all groups. + * {@code _all} for all groups. */ public SearchStats stats(String... groups) { SearchStats.Stats total = totalStats.stats(); diff --git a/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java b/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java index 5a6eaee77cae2..a9f47a501e325 100644 --- a/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java @@ -1416,7 +1416,7 @@ public void finalizeRecovery() { } /** - * Returns true if this shard can ignore a recovery attempt made to it (since the already doing/done it) + * Returns {@code true} if this shard can ignore a recovery attempt made to it (since the already doing/done it) */ public boolean ignoreRecoveryAttempt() { IndexShardState state = state(); // one time volatile read diff --git a/server/src/main/java/org/elasticsearch/index/shard/InternalIndexingStats.java b/server/src/main/java/org/elasticsearch/index/shard/InternalIndexingStats.java index e7b7b719aed6d..6579fca89966e 100644 --- a/server/src/main/java/org/elasticsearch/index/shard/InternalIndexingStats.java +++ b/server/src/main/java/org/elasticsearch/index/shard/InternalIndexingStats.java @@ -42,7 +42,7 @@ final class InternalIndexingStats implements IndexingOperationListener { /** * Returns the stats, including type specific stats. If the types are null/0 length, then nothing * is returned for them. If they are set, then only types provided will be returned, or - * _all for all types. + * {@code _all} for all types. */ IndexingStats stats(boolean isThrottled, long currentThrottleInMillis, String... types) { IndexingStats.Stats total = totalStats.stats(isThrottled, currentThrottleInMillis); diff --git a/server/src/main/java/org/elasticsearch/index/store/Store.java b/server/src/main/java/org/elasticsearch/index/store/Store.java index d2d1b96b16a18..f9ba5f900c03d 100644 --- a/server/src/main/java/org/elasticsearch/index/store/Store.java +++ b/server/src/main/java/org/elasticsearch/index/store/Store.java @@ -399,8 +399,8 @@ public final void incRef() { } /** - * Tries to increment the refCount of this Store instance. This method will return true iff the refCount was - * incremented successfully otherwise false. RefCounts are used to determine when a + * Tries to increment the refCount of this Store instance. This method will return {@code true} iff the refCount was + * incremented successfully otherwise {@code false}. RefCounts are used to determine when a * Store can be closed safely, i.e. as soon as there are no more references. Be sure to always call a * corresponding {@link #decRef}, in a finally clause; otherwise the store may never be closed. Note that * {@link #close} simply calls decRef(), which means that the Store will not really be closed until {@link @@ -767,7 +767,7 @@ public String toString() { * For backwards compatibility the snapshot might include legacy checksums that * are derived from a dedicated checksum file written by older elasticsearch version pre 1.3 *

    - * Note: This class will ignore the segments.gen file since it's optional and might + * Note: This class will ignore the {@code segments.gen} file since it's optional and might * change concurrently for safety reasons. * * @see StoreFileMetaData @@ -977,22 +977,22 @@ public Map asMap() { *

      *
    • all files in this segment have the same checksum
    • *
    • all files in this segment have the same length
    • - *
    • the segments .si files hashes are byte-identical Note: This is a using a perfect hash function, The metadata transfers the .si file content as it's hash
    • + *
    • the segments {@code .si} files hashes are byte-identical Note: This is a using a perfect hash function, The metadata transfers the {@code .si} file content as it's hash
    • *
    *

    - * The .si file contains a lot of diagnostics including a timestamp etc. in the future there might be + * The {@code .si} file contains a lot of diagnostics including a timestamp etc. in the future there might be * unique segment identifiers in there hardening this method further. *

    - * The per-commit files handles very similar. A commit is composed of the segments_N files as well as generational files like - * deletes (_x_y.del) or field-info (_x_y.fnm) files. On a per-commit level files for a commit are treated + * The per-commit files handles very similar. A commit is composed of the {@code segments_N} files as well as generational files like + * deletes ({@code _x_y.del}) or field-info ({@code _x_y.fnm}) files. On a per-commit level files for a commit are treated * as identical iff: *

      *
    • all files belonging to this commit have the same checksum
    • *
    • all files belonging to this commit have the same length
    • - *
    • the segments file segments_N files hashes are byte-identical Note: This is a using a perfect hash function, The metadata transfers the segments_N file content as it's hash
    • + *
    • the segments file {@code segments_N} files hashes are byte-identical Note: This is a using a perfect hash function, The metadata transfers the {@code segments_N} file content as it's hash
    • *
    *

    - * NOTE: this diff will not contain the segments.gen file. This file is omitted on recovery. + * NOTE: this diff will not contain the {@code segments.gen} file. This file is omitted on recovery. */ public RecoveryDiff recoveryDiff(MetadataSnapshot recoveryTargetSnapshot) { final List identical = new ArrayList<>(); @@ -1390,8 +1390,8 @@ public void deleteQuiet(String... files) { } /** - * Marks this store as corrupted. This method writes a corrupted_${uuid} file containing the given exception - * message. If a store contains a corrupted_${uuid} file {@link #isMarkedCorrupted()} will return true. + * Marks this store as corrupted. This method writes a {@code corrupted_${uuid}} file containing the given exception + * message. If a store contains a {@code corrupted_${uuid}} file {@link #isMarkedCorrupted()} will return true. */ public void markStoreCorrupted(IOException exception) throws IOException { ensureOpen(); diff --git a/server/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java b/server/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java index 908063173c28c..97310c0f65d98 100644 --- a/server/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java +++ b/server/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java @@ -126,7 +126,7 @@ public Version writtenBy() { /** * Returns a variable length hash of the file represented by this metadata object. This can be the file - * itself if the file is small enough. If the length of the hash is 0 no hash value is available + * itself if the file is small enough. If the length of the hash is {@code 0} no hash value is available */ public BytesRef hash() { return hash; diff --git a/server/src/main/java/org/elasticsearch/index/translog/MultiSnapshot.java b/server/src/main/java/org/elasticsearch/index/translog/MultiSnapshot.java index 7ea241958f87c..1b095beddb4a8 100644 --- a/server/src/main/java/org/elasticsearch/index/translog/MultiSnapshot.java +++ b/server/src/main/java/org/elasticsearch/index/translog/MultiSnapshot.java @@ -87,7 +87,7 @@ static final class SeqNoSet { private final LongObjectHashMap bitSets = new LongObjectHashMap<>(); /** - * Marks this sequence number and returns true if it is seen before. + * Marks this sequence number and returns {@code true} if it is seen before. */ boolean getAndSet(long value) { assert value >= 0; diff --git a/server/src/main/java/org/elasticsearch/index/translog/Translog.java b/server/src/main/java/org/elasticsearch/index/translog/Translog.java index 990f4f81aa344..6bd7cb71e755d 100644 --- a/server/src/main/java/org/elasticsearch/index/translog/Translog.java +++ b/server/src/main/java/org/elasticsearch/index/translog/Translog.java @@ -80,15 +80,15 @@ * different engine. *

    * Each Translog has only one translog file open for writes at any time referenced by a translog generation ID. This ID is written to a - * translog.ckp file that is designed to fit in a single disk block such that a write of the file is atomic. The checkpoint file + * {@code translog.ckp} file that is designed to fit in a single disk block such that a write of the file is atomic. The checkpoint file * is written on each fsync operation of the translog and records the number of operations written, the current translog's file generation, * its fsynced offset in bytes, and other important statistics. *

    *

    * When the current translog file reaches a certain size ({@link IndexSettings#INDEX_TRANSLOG_GENERATION_THRESHOLD_SIZE_SETTING}, or when * a clear separation between old and new operations (upon change in primary term), the current file is reopened for read only and a new - * write only file is created. Any non-current, read only translog file always has a translog-${gen}.ckp associated with it - * which is an fsynced copy of its last translog.ckp such that in disaster recovery last fsynced offsets, number of + * write only file is created. Any non-current, read only translog file always has a {@code translog-${gen}.ckp} associated with it + * which is an fsynced copy of its last {@code translog.ckp} such that in disaster recovery last fsynced offsets, number of * operation etc. are still preserved. *

    */ diff --git a/server/src/main/java/org/elasticsearch/index/translog/TranslogConfig.java b/server/src/main/java/org/elasticsearch/index/translog/TranslogConfig.java index 61b009d9b4175..a8acf58683935 100644 --- a/server/src/main/java/org/elasticsearch/index/translog/TranslogConfig.java +++ b/server/src/main/java/org/elasticsearch/index/translog/TranslogConfig.java @@ -89,7 +89,7 @@ public Path getTranslogPath() { } /** - * The translog buffer size. Default is 8kb + * The translog buffer size. Default is {@code 8kb} */ public ByteSizeValue getBufferSize() { return bufferSize; diff --git a/server/src/main/java/org/elasticsearch/indices/IndicesService.java b/server/src/main/java/org/elasticsearch/indices/IndicesService.java index f62ee380145bb..e9f9a61a669ce 100644 --- a/server/src/main/java/org/elasticsearch/indices/IndicesService.java +++ b/server/src/main/java/org/elasticsearch/indices/IndicesService.java @@ -249,7 +249,7 @@ protected void doClose() { } /** - * Returns the node stats indices stats. The includePrevious flag controls + * Returns the node stats indices stats. The {@code includePrevious} flag controls * if old shards stats will be aggregated as well (only for relevant stats, such as * refresh and indexing, not for docs/store). */ @@ -1248,7 +1248,7 @@ public AliasFilter buildAliasFilter(ClusterState state, String index, String... } /** - * Returns a new {@link QueryRewriteContext} with the given now provider + * Returns a new {@link QueryRewriteContext} with the given {@code now} provider */ public QueryRewriteContext getRewriteContext(LongSupplier nowInMillis) { return new QueryRewriteContext(xContentRegistry, namedWriteableRegistry, client, nowInMillis); diff --git a/server/src/main/java/org/elasticsearch/node/Node.java b/server/src/main/java/org/elasticsearch/node/Node.java index ecf5dfc6b24f9..f3d91f0c62bfa 100644 --- a/server/src/main/java/org/elasticsearch/node/Node.java +++ b/server/src/main/java/org/elasticsearch/node/Node.java @@ -173,7 +173,7 @@ import static java.util.stream.Collectors.toList; /** - * A node represent a node within a cluster (cluster.name). The {@link #client()} can be used + * A node represent a node within a cluster ({@code cluster.name}). The {@link #client()} can be used * in order to use a {@link Client} to perform actions/operations against the cluster. */ public class Node implements Closeable { @@ -851,7 +851,7 @@ public synchronized void close() throws IOException { /** - * Returns true if the node is closed. + * Returns {@code true} if the node is closed. */ public boolean isClosed() { return lifecycle.closed(); diff --git a/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java b/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java index dd417abe7abd5..2399f4c571c4f 100644 --- a/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java +++ b/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java @@ -1341,7 +1341,7 @@ private void checkAborted() { /** * This is a BWC layer to ensure we update the snapshots metadata with the corresponding hashes before we compare them. - * The new logic for StoreFileMetaData reads the entire .si and segments.n files to strengthen the + * The new logic for StoreFileMetaData reads the entire {@code .si} and {@code segments.n} files to strengthen the * comparison of the files on a per-segment / per-commit level. */ private static void maybeRecalculateMetadataHash(final BlobContainer blobContainer, final BlobStoreIndexShardSnapshot.FileInfo fileInfo, Store.MetadataSnapshot snapshot) throws Exception { diff --git a/server/src/main/java/org/elasticsearch/search/SearchHit.java b/server/src/main/java/org/elasticsearch/search/SearchHit.java index ba5102bf7b3fe..a6e0a0b5afa40 100644 --- a/server/src/main/java/org/elasticsearch/search/SearchHit.java +++ b/server/src/main/java/org/elasticsearch/search/SearchHit.java @@ -227,7 +227,7 @@ public boolean hasSource() { } /** - * The source of the document as string (can be null). + * The source of the document as string (can be {@code null}). */ public String getSourceAsString() { if (source == null) { @@ -242,7 +242,7 @@ public String getSourceAsString() { /** - * The source of the document as a map (can be null). + * The source of the document as a map (can be {@code null}). */ public Map getSourceAsMap() { if (source == null) { diff --git a/server/src/main/java/org/elasticsearch/search/SearchService.java b/server/src/main/java/org/elasticsearch/search/SearchService.java index cda95cec25760..da5467986d3b2 100644 --- a/server/src/main/java/org/elasticsearch/search/SearchService.java +++ b/server/src/main/java/org/elasticsearch/search/SearchService.java @@ -1022,7 +1022,7 @@ protected void doRun() throws Exception { } /** - * Returns a new {@link QueryRewriteContext} with the given now provider + * Returns a new {@link QueryRewriteContext} with the given {@code now} provider */ public QueryRewriteContext getRewriteContext(LongSupplier nowInMillis) { return indicesService.getRewriteContext(nowInMillis); diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/AggregatorFactory.java b/server/src/main/java/org/elasticsearch/search/aggregations/AggregatorFactory.java index 9a47635416aed..88cc7319948bd 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/AggregatorFactory.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/AggregatorFactory.java @@ -206,7 +206,7 @@ protected abstract Aggregator createInternal(Aggregator parent, boolean collects * parent will be {@code null}) * @param collectsFromSingleBucket * If true then the created aggregator will only be collected - * with 0 as a bucket ordinal. Some factories can take + * with {@code 0} as a bucket ordinal. Some factories can take * advantage of this in order to return more optimized * implementations. * @@ -222,7 +222,7 @@ public AggregatorFactory getParent() { /** * Utility method. Given an {@link AggregatorFactory} that creates - * {@link Aggregator}s that only know how to collect bucket 0, this + * {@link Aggregator}s that only know how to collect bucket {@code 0}, this * returns an aggregator that can collect any bucket. */ protected static Aggregator asMultiBucketAggregator(final AggregatorFactory factory, final SearchContext context, diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java b/server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java index 7f6e74e68b219..98cadd4aefa15 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java @@ -61,7 +61,7 @@ public ReduceContext(BigArrays bigArrays, ScriptService scriptService, IntConsum /** * Returns true iff the current reduce phase is the final reduce phase. This indicates if operations like - * pipeline aggregations should be applied or if specific features like minDocCount should be taken into account. + * pipeline aggregations should be applied or if specific features like {@code minDocCount} should be taken into account. * Operations that are potentially loosing information can only be applied during the final reduce phase. */ public boolean isFinalReduce() { @@ -77,7 +77,7 @@ public ScriptService scriptService() { } /** - * Adds count buckets to the global count for the request and fails if this number is greater than + * Adds {@code count} buckets to the global count for the request and fails if this number is greater than * the maximum number of buckets allowed in a response */ public void consumeBucketsAndMaybeBreak(int size) { diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java index 02cf3adf88ad7..504758e7a4ec2 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java @@ -112,7 +112,7 @@ public final int bucketDocCount(long bucketOrd) { } /** - * Adds count buckets to the global count for the request and fails if this number is greater than + * Adds {@code count} buckets to the global count for the request and fails if this number is greater than * the maximum number of buckets allowed in a response */ protected final void consumeBucketsAndMaybeBreak(int count) { diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeAggregationBuilder.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeAggregationBuilder.java index 0912555ea711b..8a0b4eedfed81 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeAggregationBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeAggregationBuilder.java @@ -129,7 +129,7 @@ public List> sources() { /** * Sets the values that indicates which composite bucket this request should "aggregate after". - * Defaults to null. + * Defaults to {@code null}. */ public CompositeAggregationBuilder aggregateAfter(Map afterKey) { this.after = afterKey; @@ -137,7 +137,7 @@ public CompositeAggregationBuilder aggregateAfter(Map afterKey) } /** - * The number of composite buckets to return. Defaults to 10. + * The number of composite buckets to return. Defaults to {@code 10}. */ public CompositeAggregationBuilder size(int size) { this.size = size; diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/cardinality/HyperLogLogPlusPlus.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/cardinality/HyperLogLogPlusPlus.java index d8f4c28fee497..1dfe70d4b7f66 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/cardinality/HyperLogLogPlusPlus.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/cardinality/HyperLogLogPlusPlus.java @@ -517,7 +517,7 @@ public int size(long bucket) { /** * Add k to the hash table associated with bucket. - * Return -1 if the value was already in the set or the new set size if it was added. + * Return {@code -1} if the value was already in the set or the new set size if it was added. */ public int add(long bucket, int k) { sizes = bigArrays.grow(sizes, bucket + 1); diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/scripted/ScriptedMetricAggregationBuilder.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/scripted/ScriptedMetricAggregationBuilder.java index c11c68f9b2524..0bc759a0d47a7 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/scripted/ScriptedMetricAggregationBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/scripted/ScriptedMetricAggregationBuilder.java @@ -103,7 +103,7 @@ protected void doWriteTo(StreamOutput out) throws IOException { } /** - * Set the init script. + * Set the {@code init} script. */ public ScriptedMetricAggregationBuilder initScript(Script initScript) { if (initScript == null) { @@ -114,14 +114,14 @@ public ScriptedMetricAggregationBuilder initScript(Script initScript) { } /** - * Get the init script. + * Get the {@code init} script. */ public Script initScript() { return initScript; } /** - * Set the map script. + * Set the {@code map} script. */ public ScriptedMetricAggregationBuilder mapScript(Script mapScript) { if (mapScript == null) { @@ -132,14 +132,14 @@ public ScriptedMetricAggregationBuilder mapScript(Script mapScript) { } /** - * Get the map script. + * Get the {@code map} script. */ public Script mapScript() { return mapScript; } /** - * Set the combine script. + * Set the {@code combine} script. */ public ScriptedMetricAggregationBuilder combineScript(Script combineScript) { if (combineScript == null) { @@ -150,14 +150,14 @@ public ScriptedMetricAggregationBuilder combineScript(Script combineScript) { } /** - * Get the combine script. + * Get the {@code combine} script. */ public Script combineScript() { return combineScript; } /** - * Set the reduce script. + * Set the {@code reduce} script. */ public ScriptedMetricAggregationBuilder reduceScript(Script reduceScript) { if (reduceScript == null) { @@ -168,15 +168,15 @@ public ScriptedMetricAggregationBuilder reduceScript(Script reduceScript) { } /** - * Get the reduce script. + * Get the {@code reduce} script. */ public Script reduceScript() { return reduceScript; } /** - * Set parameters that will be available in the init, - * map and combine phases. + * Set parameters that will be available in the {@code init}, + * {@code map} and {@code combine} phases. */ public ScriptedMetricAggregationBuilder params(Map params) { if (params == null) { @@ -187,8 +187,8 @@ public ScriptedMetricAggregationBuilder params(Map params) { } /** - * Get parameters that will be available in the init, - * map and combine phases. + * Get parameters that will be available in the {@code init}, + * {@code map} and {@code combine} phases. */ public Map params() { return params; diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/tophits/TopHitsAggregationBuilder.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/tophits/TopHitsAggregationBuilder.java index 39e184f557dc3..a528814e2891d 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/tophits/TopHitsAggregationBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/tophits/TopHitsAggregationBuilder.java @@ -176,7 +176,7 @@ protected void doWriteTo(StreamOutput out) throws IOException { } /** - * From index to start the search from. Defaults to 0. + * From index to start the search from. Defaults to {@code 0}. */ public TopHitsAggregationBuilder from(int from) { if (from < 0) { @@ -194,7 +194,7 @@ public int from() { } /** - * The number of search hits to return. Defaults to 10. + * The number of search hits to return. Defaults to {@code 10}. */ public TopHitsAggregationBuilder size(int size) { if (size < 0) { @@ -535,7 +535,7 @@ public boolean version() { /** * Applies when sorting, and controls if scores will be tracked as well. - * Defaults to false. + * Defaults to {@code false}. */ public TopHitsAggregationBuilder trackScores(boolean trackScores) { this.trackScores = trackScores; diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/support/AggregationPath.java b/server/src/main/java/org/elasticsearch/search/aggregations/support/AggregationPath.java index 995381373ab40..3566792b497a1 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/support/AggregationPath.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/support/AggregationPath.java @@ -41,7 +41,7 @@ * the sort-by value. *

    * The path has the following form: - *

    {@code ['>'*]['.']}
    + * {@code ['>'*]['.']} *

    * Examples: * diff --git a/server/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java b/server/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java index 3e0e67a723ef8..532619026253b 100644 --- a/server/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java @@ -332,7 +332,7 @@ public QueryBuilder postFilter() { } /** - * From index to start the search from. Defaults to 0. + * From index to start the search from. Defaults to {@code 0}. */ public SearchSourceBuilder from(int from) { if (from < 0) { @@ -350,7 +350,7 @@ public int from() { } /** - * The number of search hits to return. Defaults to 10. + * The number of search hits to return. Defaults to {@code 10}. */ public SearchSourceBuilder size(int size) { if (size < 0) { @@ -498,7 +498,7 @@ public List> sorts() { /** * Applies when sorting, and controls if scores will be tracked as well. - * Defaults to false. + * Defaults to {@code false}. */ public SearchSourceBuilder trackScores(boolean trackScores) { this.trackScores = trackScores; @@ -528,7 +528,7 @@ public SearchSourceBuilder trackTotalHits(boolean trackTotalHits) { * The sort values that indicates which docs this request should "search after". * The sort values of the search_after must be equal to the number of sort fields in the query and they should be * of the same type (or parsable as such). - * Defaults to null. + * Defaults to {@code null}. */ public Object[] searchAfter() { if (searchAfterBuilder == null) { @@ -641,7 +641,7 @@ public SearchSourceBuilder clearRescorers() { } /** - * Should the query be profiled. Defaults to false + * Should the query be profiled. Defaults to {@code false} */ public SearchSourceBuilder profile(boolean profile) { this.profile = profile; diff --git a/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/AbstractHighlighterBuilder.java b/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/AbstractHighlighterBuilder.java index f8618db3048e2..e59bd718d3226 100644 --- a/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/AbstractHighlighterBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/AbstractHighlighterBuilder.java @@ -286,8 +286,8 @@ public Integer numOfFragments() { /** * Set type of highlighter to use. Out of the box supported types - * are unified, plain and fvj. - * Defaults to unified. + * are {@code unified}, {@code plain} and {@code fvj}. + * Defaults to {@code unified}. * Details of the different highlighter types are covered in the reference guide. */ @SuppressWarnings("unchecked") @@ -305,7 +305,7 @@ public String highlighterType() { /** * Sets what fragmenter to use to break up text that is eligible for highlighting. - * This option is only applicable when using the plain highlighterType highlighter. + * This option is only applicable when using the plain highlighterType {@code highlighter}. * Permitted values are "simple" or "span" relating to {@link SimpleFragmenter} and * {@link SimpleSpanFragmenter} implementations respectively with the default being "span" */ @@ -340,8 +340,8 @@ public QueryBuilder highlightQuery() { /** * The order of fragments per field. By default, ordered by the order in the - * highlighted text. Can be score, which then it will be ordered - * by score of the fragments, or none. + * highlighted text. Can be {@code score}, which then it will be ordered + * by score of the fragments, or {@code none}. */ public HB order(String order) { return order(Order.fromString(order)); @@ -365,9 +365,9 @@ public Order order() { } /** - * Set this to true when using the highlighterType fvh + * Set this to true when using the highlighterType {@code fvh} * and you want to provide highlighting on filter clauses in your - * query. Default is false. + * query. Default is {@code false}. */ @SuppressWarnings("unchecked") public HB highlightFilter(Boolean highlightFilter) { @@ -383,7 +383,7 @@ public Boolean highlightFilter() { } /** - * When using the highlighterType fvh this setting + * When using the highlighterType {@code fvh} this setting * controls which scanner to use for fragment boundaries, and defaults to "simple". */ @SuppressWarnings("unchecked") @@ -393,7 +393,7 @@ public HB boundaryScannerType(String boundaryScannerType) { } /** - * When using the highlighterType fvh this setting + * When using the highlighterType {@code fvh} this setting * controls which scanner to use for fragment boundaries, and defaults to "simple". */ @SuppressWarnings("unchecked") @@ -410,7 +410,7 @@ public BoundaryScannerType boundaryScannerType() { } /** - * When using the highlighterType fvh this setting + * When using the highlighterType {@code fvh} this setting * controls how far to look for boundary characters, and defaults to 20. */ @SuppressWarnings("unchecked") @@ -427,7 +427,7 @@ public Integer boundaryMaxScan() { } /** - * When using the highlighterType fvh this setting + * When using the highlighterType {@code fvh} this setting * defines what constitutes a boundary for highlighting. It’s a single string with * each boundary character defined in it. It defaults to .,!? \t\n */ @@ -445,7 +445,7 @@ public char[] boundaryChars() { } /** - * When using the highlighterType fvh and boundaryScannerType break_iterator, this setting + * When using the highlighterType {@code fvh} and boundaryScannerType {@code break_iterator}, this setting * controls the locale to use by the BreakIterator, defaults to "root". */ @SuppressWarnings("unchecked") diff --git a/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightBuilder.java b/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightBuilder.java index ff332c7d73461..049de439ac750 100644 --- a/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightBuilder.java @@ -60,7 +60,7 @@ public class HighlightBuilder extends AbstractHighlighterBuilderfvh should provide highlighting on filter clauses */ + /** default for whether {@code fvh} should provide highlighting on filter clauses */ public static final boolean DEFAULT_HIGHLIGHT_FILTER = false; /** default for highlight fragments being ordered by score */ public static final boolean DEFAULT_SCORE_ORDERED = false; @@ -79,14 +79,14 @@ public class HighlightBuilder extends AbstractHighlighterBuilder"}; - /** the default opening tags when tag_schema = "styled" */ + /** the default opening tags when {@code tag_schema = "styled"} */ public static final String[] DEFAULT_STYLED_PRE_TAG = { "", "", "", "", "", "", "", "", "", "" }; - /** the default closing tags when tag_schema = "styled" */ + /** the default closing tags when {@code tag_schema = "styled"} */ public static final String[] DEFAULT_STYLED_POST_TAGS = {""}; /** @@ -198,7 +198,7 @@ public List fields() { /** * Set a tag scheme that encapsulates a built in pre and post tags. The allowed schemes - * are styled and default. + * are {@code styled} and {@code default}. * * @param schemaName The tag scheme name */ @@ -220,7 +220,7 @@ public HighlightBuilder tagsSchema(String schemaName) { /** * Set encoder for the highlighting - * are styled and default. + * are {@code styled} and {@code default}. * * @param encoder name */ diff --git a/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightField.java b/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightField.java index 6030d3863d88f..8b839a7e8c07e 100644 --- a/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightField.java +++ b/server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightField.java @@ -68,14 +68,14 @@ public String getName() { } /** - * The highlighted fragments. null if failed to highlight (for example, the field is not stored). + * The highlighted fragments. {@code null} if failed to highlight (for example, the field is not stored). */ public Text[] fragments() { return fragments; } /** - * The highlighted fragments. null if failed to highlight (for example, the field is not stored). + * The highlighted fragments. {@code null} if failed to highlight (for example, the field is not stored). */ public Text[] getFragments() { return fragments(); diff --git a/server/src/main/java/org/elasticsearch/search/internal/ContextIndexSearcher.java b/server/src/main/java/org/elasticsearch/search/internal/ContextIndexSearcher.java index fce1e323fa7b3..a7eb0a953ba58 100644 --- a/server/src/main/java/org/elasticsearch/search/internal/ContextIndexSearcher.java +++ b/server/src/main/java/org/elasticsearch/search/internal/ContextIndexSearcher.java @@ -52,7 +52,7 @@ */ public class ContextIndexSearcher extends IndexSearcher implements Releasable { - /** The wrapped {@link IndexSearcher}. The reason why we sometimes prefer delegating to this searcher instead of super is that + /** The wrapped {@link IndexSearcher}. The reason why we sometimes prefer delegating to this searcher instead of {@code super} is that * this instance may have more assertions, for example if it comes from MockInternalEngine which wraps the IndexSearcher into an * AssertingIndexSearcher. */ private final IndexSearcher in; diff --git a/server/src/main/java/org/elasticsearch/search/internal/SearchContext.java b/server/src/main/java/org/elasticsearch/search/internal/SearchContext.java index 75290a75a8a90..70a52c39ee110 100644 --- a/server/src/main/java/org/elasticsearch/search/internal/SearchContext.java +++ b/server/src/main/java/org/elasticsearch/search/internal/SearchContext.java @@ -243,7 +243,7 @@ public InnerHitsContext innerHits() { public abstract SearchContext trackTotalHits(boolean trackTotalHits); /** - * Indicates if the total hit count for the query should be tracked. Defaults to true + * Indicates if the total hit count for the query should be tracked. Defaults to {@code true} */ public abstract boolean trackTotalHits(); diff --git a/server/src/main/java/org/elasticsearch/search/internal/ShardSearchRequest.java b/server/src/main/java/org/elasticsearch/search/internal/ShardSearchRequest.java index 0a1513e17d08e..6f00740487e2c 100644 --- a/server/src/main/java/org/elasticsearch/search/internal/ShardSearchRequest.java +++ b/server/src/main/java/org/elasticsearch/search/internal/ShardSearchRequest.java @@ -103,7 +103,7 @@ public interface ShardSearchRequest { * Returns the filter associated with listed filtering aliases. *

    * The list of filtering aliases should be obtained by calling MetaData.filteringAliases. - * Returns null if no filtering is required.

    + * Returns {@code null} if no filtering is required.

    */ static QueryBuilder parseAliasFilter(CheckedFunction filterParser, IndexMetaData metaData, String... aliasNames) { diff --git a/server/src/main/java/org/elasticsearch/search/rescore/QueryRescorerBuilder.java b/server/src/main/java/org/elasticsearch/search/rescore/QueryRescorerBuilder.java index da506959ce4f6..5690e584eac20 100644 --- a/server/src/main/java/org/elasticsearch/search/rescore/QueryRescorerBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/rescore/QueryRescorerBuilder.java @@ -110,7 +110,7 @@ public QueryBuilder getRescoreQuery() { } /** - * Sets the original query weight for rescoring. The default is 1.0 + * Sets the original query weight for rescoring. The default is {@code 1.0} */ public QueryRescorerBuilder setQueryWeight(float queryWeight) { this.queryWeight = queryWeight; @@ -119,14 +119,14 @@ public QueryRescorerBuilder setQueryWeight(float queryWeight) { /** - * Gets the original query weight for rescoring. The default is 1.0 + * Gets the original query weight for rescoring. The default is {@code 1.0} */ public float getQueryWeight() { return this.queryWeight; } /** - * Sets the original query weight for rescoring. The default is 1.0 + * Sets the original query weight for rescoring. The default is {@code 1.0} */ public QueryRescorerBuilder setRescoreQueryWeight(float rescoreQueryWeight) { this.rescoreQueryWeight = rescoreQueryWeight; @@ -134,7 +134,7 @@ public QueryRescorerBuilder setRescoreQueryWeight(float rescoreQueryWeight) { } /** - * Gets the original query weight for rescoring. The default is 1.0 + * Gets the original query weight for rescoring. The default is {@code 1.0} */ public float getRescoreQueryWeight() { return this.rescoreQueryWeight; @@ -149,7 +149,7 @@ public QueryRescorerBuilder setScoreMode(QueryRescoreMode scoreMode) { } /** - * Gets the original query score mode. The default is total + * Gets the original query score mode. The default is {@code total} */ public QueryRescoreMode getScoreMode() { return this.scoreMode; diff --git a/server/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java b/server/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java index 529cb4e86ac88..6a64b1c0cc940 100644 --- a/server/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java @@ -145,8 +145,8 @@ public String getFieldName() { } /** - * Sets the value when a field is missing in a doc. Can also be set to _last or - * _first to sort missing last or first respectively. + * Sets the value when a field is missing in a doc. Can also be set to {@code _last} or + * {@code _first} to sort missing last or first respectively. */ public FieldSortBuilder missing(Object missing) { this.missing = missing; @@ -162,7 +162,7 @@ public Object missing() { * Set the type to use in case the current field is not mapped in an index. * Specifying a type tells Elasticsearch what type the sort values should * have, which is important for cross-index search, if there are sort fields - * that exist on some indices only. If the unmapped type is null + * that exist on some indices only. If the unmapped type is {@code null} * then query execution will fail if one or more indices don't have a * mapping for the current field. */ diff --git a/server/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggestionBuilder.java b/server/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggestionBuilder.java index 4f5c3b789f892..3102ddd0e7787 100644 --- a/server/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggestionBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggestionBuilder.java @@ -231,7 +231,7 @@ public boolean skipDuplicates() { } /** - * Should duplicates be filtered or not. Defaults to false. + * Should duplicates be filtered or not. Defaults to {@code false}. */ public CompletionSuggestionBuilder skipDuplicates(boolean skipDuplicates) { this.skipDuplicates = skipDuplicates; diff --git a/server/src/main/java/org/elasticsearch/search/suggest/phrase/DirectCandidateGeneratorBuilder.java b/server/src/main/java/org/elasticsearch/search/suggest/phrase/DirectCandidateGeneratorBuilder.java index da7968e18d137..a37be5d4adc4f 100644 --- a/server/src/main/java/org/elasticsearch/search/suggest/phrase/DirectCandidateGeneratorBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/suggest/phrase/DirectCandidateGeneratorBuilder.java @@ -161,7 +161,7 @@ String suggestMode() { * specified. This value will be compared to the string distance result * of each candidate spelling correction. *

    - * Default is 0.5 + * Default is {@code 0.5} */ public DirectCandidateGeneratorBuilder accuracy(float accuracy) { this.accuracy = accuracy; @@ -238,7 +238,7 @@ String stringDistance() { * Sets the maximum edit distance candidate suggestions can have in * order to be considered as a suggestion. Can only be a value between 1 * and 2. Any other value result in an bad request error being thrown. - * Defaults to 2. + * Defaults to {@code 2}. */ public DirectCandidateGeneratorBuilder maxEdits(Integer maxEdits) { if (maxEdits < 1 || maxEdits > LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE) { @@ -255,7 +255,7 @@ Integer maxEdits() { /** * A factor that is used to multiply with the size in order to inspect * more candidate suggestions. Can improve accuracy at the cost of - * performance. Defaults to 5. + * performance. Defaults to {@code 5}. */ public DirectCandidateGeneratorBuilder maxInspections(Integer maxInspections) { this.maxInspections = maxInspections; @@ -271,7 +271,7 @@ Integer maxInspections() { * can exist in order to be corrected. Can be a relative percentage * number (e.g 0.4) or an absolute number to represent document * frequencies. If an value higher than 1 is specified then fractional - * can not be specified. Defaults to 0.01. + * can not be specified. Defaults to {@code 0.01}. *

    * This can be used to exclude high frequency terms from being * suggested. High frequency terms are usually spelled correctly on top @@ -303,7 +303,7 @@ Integer prefixLength() { /** * The minimum length a suggest text term must have in order to be - * corrected. Defaults to 4. + * corrected. Defaults to {@code 4}. */ public DirectCandidateGeneratorBuilder minWordLength(int minWordLength) { this.minWordLength = minWordLength; diff --git a/server/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java b/server/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java index 4f20fad38cf0e..9b87e442ad60e 100644 --- a/server/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java @@ -55,7 +55,7 @@ import java.util.Set; /** - * Defines the actual suggest command for phrase suggestions ( phrase). + * Defines the actual suggest command for phrase suggestions ( {@code phrase}). */ public class PhraseSuggestionBuilder extends SuggestionBuilder { @@ -185,8 +185,8 @@ public void doWriteTo(StreamOutput out) throws IOException { /** * Sets the gram size for the n-gram model used for this suggester. The - * default value is 1 corresponding to unigrams. Use - * 2 for bigrams and 3 for trigrams. + * default value is {@code 1} corresponding to {@code unigrams}. Use + * {@code 2} for {@code bigrams} and {@code 3} for {@code trigrams}. */ public PhraseSuggestionBuilder gramSize(int gramSize) { if (gramSize < 1) { @@ -207,9 +207,9 @@ public Integer gramSize() { * Sets the maximum percentage of the terms that at most considered to be * misspellings in order to form a correction. This method accepts a float * value in the range [0..1) as a fraction of the actual query terms a - * number >=1 as an absolute number of query terms. + * number {@code >=1} as an absolute number of query terms. * - * The default is set to 1.0 which corresponds to that only + * The default is set to {@code 1.0} which corresponds to that only * corrections with at most 1 misspelled term are returned. */ public PhraseSuggestionBuilder maxErrors(float maxErrors) { @@ -246,7 +246,7 @@ public String separator() { /** * Sets the likelihood of a term being a misspelled even if the term exists - * in the dictionary. The default it 0.95 corresponding to 5% or + * in the dictionary. The default it {@code 0.95} corresponding to 5% or * the real words are misspelled. */ public PhraseSuggestionBuilder realWordErrorLikelihood(float realWordErrorLikelihood) { @@ -269,9 +269,9 @@ public Float realWordErrorLikelihood() { * defines a factor applied to the input phrases score which is used as a * threshold for other suggest candidates. Only candidates that score higher * than the threshold will be included in the result. For instance a - * confidence level of 1.0 will only return suggestions that score - * higher than the input phrase. If set to 0.0 the top N candidates - * are returned. The default is 1.0 + * confidence level of {@code 1.0} will only return suggestions that score + * higher than the input phrase. If set to {@code 0.0} the top N candidates + * are returned. The default is {@code 1.0} */ public PhraseSuggestionBuilder confidence(float confidence) { if (confidence < 0.0) { diff --git a/server/src/main/java/org/elasticsearch/search/suggest/term/TermSuggestionBuilder.java b/server/src/main/java/org/elasticsearch/search/suggest/term/TermSuggestionBuilder.java index d15a06bfcb73f..b08502f7c3bd6 100644 --- a/server/src/main/java/org/elasticsearch/search/suggest/term/TermSuggestionBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/suggest/term/TermSuggestionBuilder.java @@ -168,7 +168,7 @@ public SuggestMode suggestMode() { * This value will be compared to the string distance result of each * candidate spelling correction. *

    - * Default is 0.5 + * Default is {@code 0.5} */ public TermSuggestionBuilder accuracy(float accuracy) { if (accuracy < 0.0f || accuracy > 1.0f) { @@ -244,7 +244,7 @@ public StringDistanceImpl stringDistance() { * Sets the maximum edit distance candidate suggestions can have in order to * be considered as a suggestion. Can only be a value between 1 and 2. Any * other value result in an bad request error being thrown. Defaults to - * 2. + * {@code 2}. */ public TermSuggestionBuilder maxEdits(int maxEdits) { if (maxEdits < 1 || maxEdits > 2) { @@ -264,7 +264,7 @@ public int maxEdits() { /** * A factor that is used to multiply with the size in order to inspect more * candidate suggestions. Can improve accuracy at the cost of performance. - * Defaults to 5. + * Defaults to {@code 5}. */ public TermSuggestionBuilder maxInspections(int maxInspections) { if (maxInspections < 0) { @@ -286,7 +286,7 @@ public int maxInspections() { * exist in order to be corrected. Can be a relative percentage number (e.g * 0.4) or an absolute number to represent document frequencies. If an value * higher than 1 is specified then fractional can not be specified. Defaults - * to 0.01. + * to {@code 0.01}. *

    * This can be used to exclude high frequency terms from being suggested. * High frequency terms are usually spelled correctly on top of this this @@ -333,7 +333,7 @@ public int prefixLength() { /** * The minimum length a suggest text term must have in order to be - * corrected. Defaults to 4. + * corrected. Defaults to {@code 4}. */ public TermSuggestionBuilder minWordLength(int minWordLength) { if (minWordLength < 1) { diff --git a/server/src/main/java/org/elasticsearch/transport/RemoteClusterService.java b/server/src/main/java/org/elasticsearch/transport/RemoteClusterService.java index f454571301777..71a1e3ec590b1 100644 --- a/server/src/main/java/org/elasticsearch/transport/RemoteClusterService.java +++ b/server/src/main/java/org/elasticsearch/transport/RemoteClusterService.java @@ -79,9 +79,9 @@ public final class RemoteClusterService extends RemoteClusterAware implements Cl /** * The name of a node attribute to select nodes that should be connected to in the remote cluster. - * For instance a node can be configured with node.attr.gateway: true in order to be eligible as a gateway node between - * clusters. In that case search.remote.node.attr: gateway can be used to filter out other nodes in the remote cluster. - * The value of the setting is expected to be a boolean, true for nodes that can become gateways, false otherwise. + * For instance a node can be configured with {@code node.attr.gateway: true} in order to be eligible as a gateway node between + * clusters. In that case {@code search.remote.node.attr: gateway} can be used to filter out other nodes in the remote cluster. + * The value of the setting is expected to be a boolean, {@code true} for nodes that can become gateways, {@code false} otherwise. */ public static final Setting REMOTE_NODE_ATTRIBUTE = Setting.simpleString("search.remote.node.attr", Setting.Property.NodeScope); diff --git a/server/src/main/java/org/elasticsearch/transport/RemoteConnectionInfo.java b/server/src/main/java/org/elasticsearch/transport/RemoteConnectionInfo.java index cb51f7edce570..7995f23ad1f49 100644 --- a/server/src/main/java/org/elasticsearch/transport/RemoteConnectionInfo.java +++ b/server/src/main/java/org/elasticsearch/transport/RemoteConnectionInfo.java @@ -33,7 +33,7 @@ /** * This class encapsulates all remote cluster information to be rendered on - * _remote/info requests. + * {@code _remote/info} requests. */ public final class RemoteConnectionInfo implements ToXContentFragment, Writeable { final List seedNodes; diff --git a/server/src/main/java/org/elasticsearch/transport/TcpTransport.java b/server/src/main/java/org/elasticsearch/transport/TcpTransport.java index 292ccc6bab886..7b4ee27b0f065 100644 --- a/server/src/main/java/org/elasticsearch/transport/TcpTransport.java +++ b/server/src/main/java/org/elasticsearch/transport/TcpTransport.java @@ -1751,7 +1751,7 @@ public static Set getProfileSettings(Settings settings) { } /** - * Representation of a transport profile settings for a transport.profiles.$profilename.* + * Representation of a transport profile settings for a {@code transport.profiles.$profilename.*} */ public static final class ProfileSettings { public final String profileName; diff --git a/server/src/main/java/org/elasticsearch/transport/Transport.java b/server/src/main/java/org/elasticsearch/transport/Transport.java index b3471b942dae2..6ef698f1740b3 100644 --- a/server/src/main/java/org/elasticsearch/transport/Transport.java +++ b/server/src/main/java/org/elasticsearch/transport/Transport.java @@ -59,7 +59,7 @@ public interface Transport extends LifecycleComponent { TransportAddress[] addressesFromString(String address, int perAddressLimit) throws UnknownHostException; /** - * Returns true if the node is connected. + * Returns {@code true} if the node is connected. */ boolean nodeConnected(DiscoveryNode node);