Skip navigation links
  • Module
  • Package
  • Class
  • Tree
  • Deprecated
  • Index
  • Help

Deprecated API

Contents

  • Terminally Deprecated
  • Interfaces
  • Classes
  • Enum Classes
  • Exceptions
  • Fields
  • Methods
  • Constructors
  • Enum Constants
  • Terminally Deprecated Elements
    Element
    Description
    org.elasticsearch.action.ActionListener.wrap(Runnable)
    in favour of ActionListener.running(Runnable) because this implementation doesn't "wrap" exceptions from ActionListener.onResponse(Response) into ActionListener.onFailure(java.lang.Exception).
    org.elasticsearch.action.support.HandledTransportAction(String, boolean, TransportService, ActionFilters, Writeable.Reader<Request>)
    always specify an executor
    org.elasticsearch.action.support.HandledTransportAction(String, TransportService, ActionFilters, Writeable.Reader<Request>)
    always specify an executor
    org.elasticsearch.cluster.ClusterState.Builder.compatibilityVersions(Map<String, CompatibilityVersions>)
    org.elasticsearch.cluster.ClusterState.Builder.putTransportVersion(String, TransportVersion)
    org.elasticsearch.plugins.ClusterPlugin.getShardsAllocators(Settings, ClusterSettings)
  • Deprecated Interfaces
    Interface
    Description
    org.elasticsearch.plugins.NetworkPlugin
  • Deprecated Classes
    Class
    Description
    org.elasticsearch.action.bulk.TransportSingleItemBulkWriteAction
    org.elasticsearch.action.delete.TransportDeleteAction
    org.elasticsearch.action.index.TransportIndexAction
    org.elasticsearch.client.internal.Requests
    for removal
    org.elasticsearch.common.logging.ESJsonLayout
    ECSJsonlayout should be used as JSON logs layout
    org.elasticsearch.common.logging.NodeAndClusterIdConverter
    this class is kept in order to allow working log configuration from 7.x
    org.elasticsearch.index.query.GeoPolygonQueryBuilder
    use GeoShapeQueryBuilder
    org.elasticsearch.lucene.similarity.LegacyBM25Similarity
    BM25Similarity should be used instead
    org.elasticsearch.search.aggregations.pipeline.MovAvgPipelineAggregationBuilder
    Only for 7.x rest compat
  • Deprecated Enum Classes
    Enum Class
    Description
    org.elasticsearch.index.SlowLogLevel
    org.elasticsearch.search.aggregations.support.ValueType
    We are in the process of replacing this class with ValuesSourceType, so new uses or entries to the enum are discouraged. There is currently no migration path for existing uses, notably parsing user value type hints and Composite aggregation, should continue to use this for now. Most importantly DO NOT ADD NEW PLACES WE SERIALIZE THIS ENUM!
  • Deprecated Exceptions
    Exceptions
    Description
    org.elasticsearch.script.GeneralScriptException
    Use ScriptException for exceptions from the scripting engine, otherwise use a more appropriate exception (e.g. if thrown from various abstractions)
    org.elasticsearch.snapshots.SnapshotCreationException
    This exception isn't thrown anymore. It's only here for BwC.
  • Deprecated Fields
    Field
    Description
    org.elasticsearch.action.support.TransportAction.logger
    declare your own logger.
    org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_ROLLUP_SOURCE_NAME
    org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_ROLLUP_SOURCE_UUID
    org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_VERSION_UPGRADED
    org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_VERSION_UPGRADED_STRING
    org.elasticsearch.common.network.NetworkUtils.SUPPORTS_V6
    transition mechanism only, do not use
    org.elasticsearch.discovery.DiscoveryModule.LEGACY_MULTI_NODE_DISCOVERY_TYPE
    org.elasticsearch.index.engine.EngineConfig.INDEX_OPTIMIZE_AUTO_GENERATED_IDS
    org.elasticsearch.index.IndexingSlowLog.INDEX_INDEXING_SLOWLOG_LEVEL_SETTING
    org.elasticsearch.index.IndexSettings.MAX_ADJACENCY_MATRIX_FILTERS_SETTING
    org.elasticsearch.index.mapper.GeoShapeFieldMapper.PARSER
    org.elasticsearch.index.SearchSlowLog.INDEX_SEARCH_SLOWLOG_LEVEL
    org.elasticsearch.index.store.Store.FORCE_RAM_TERM_DICT
  • Deprecated Methods
    Method
    Description
    org.elasticsearch.action.ActionListener.wrap(Runnable)
    in favour of ActionListener.running(Runnable) because this implementation doesn't "wrap" exceptions from ActionListener.onResponse(Response) into ActionListener.onFailure(java.lang.Exception).
    org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest.transientSettings()
    Transient settings are in the process of being removed. Use persistent settings to update your cluster settings instead.
    org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest.transientSettings(String, XContentType)
    Transient settings are in the process of being removed. Use persistent settings to update your cluster settings instead.
    org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest.transientSettings(Map<String, ?>)
    Transient settings are in the process of being removed. Use persistent settings to update your cluster settings instead.
    org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest.transientSettings(Settings)
    Transient settings are in the process of being removed. Use persistent settings to update your cluster settings instead.
    org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest.transientSettings(Settings.Builder)
    Transient settings are in the process of being removed. Use persistent settings to update your cluster settings instead.
    org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequestBuilder.setTransientSettings(Settings)
    Transient settings are in the process of being removed. Use persistent settings to update your cluster settings instead.
    org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequestBuilder.setTransientSettings(Settings.Builder)
    Transient settings are in the process of being removed. Use persistent settings to update your cluster settings instead.
    org.elasticsearch.action.get.GetResponse.iterator()
    Use GetResponse.getSource() instead
    org.elasticsearch.action.support.tasks.BaseTasksRequest.getParentTaskId()
    Use BaseTasksRequest.getTargetParentTaskId()
    org.elasticsearch.action.support.tasks.BaseTasksRequest.getTaskId()
    Use BaseTasksRequest.getTargetTaskId()
    org.elasticsearch.action.support.tasks.BaseTasksRequest.setParentTaskId(TaskId)
    Use BaseTasksRequest.setTargetParentTaskId(TaskId)
    org.elasticsearch.action.support.tasks.BaseTasksRequest.setTaskId(TaskId)
    Use BaseTasksRequest.setTargetTaskId(TaskId)
    org.elasticsearch.action.termvectors.TermVectorsRequest.doc(BytesReference, boolean)
    use TermVectorsRequest.doc(BytesReference, boolean, XContentType) to avoid content auto detection
    org.elasticsearch.action.update.UpdateRequest.addScriptParam(String, Object)
    Use UpdateRequest.script(Script) instead
    org.elasticsearch.action.update.UpdateRequest.script(String)
    Use UpdateRequest.script(Script) instead
    org.elasticsearch.action.update.UpdateRequest.script(String, String, ScriptType, Map<String, Object>)
    Use UpdateRequest.script(Script) instead
    org.elasticsearch.action.update.UpdateRequest.script(String, ScriptType)
    Use UpdateRequest.script(Script) instead
    org.elasticsearch.action.update.UpdateRequest.script(String, ScriptType, Map<String, Object>)
    Use UpdateRequest.script(Script) instead
    org.elasticsearch.action.update.UpdateRequest.scriptLang()
    Use UpdateRequest.script() instead
    org.elasticsearch.action.update.UpdateRequest.scriptLang(String)
    Use UpdateRequest.script(Script) instead
    org.elasticsearch.action.update.UpdateRequest.scriptParams()
    Use UpdateRequest.script() instead
    org.elasticsearch.action.update.UpdateRequest.scriptParams(Map<String, Object>)
    Use UpdateRequest.script(Script) instead
    org.elasticsearch.action.update.UpdateRequest.scriptString()
    Use UpdateRequest.script() instead
    org.elasticsearch.action.update.UpdateRequest.scriptType()
    Use UpdateRequest.script() instead
    org.elasticsearch.cluster.ClusterState.Builder.compatibilityVersions(Map<String, CompatibilityVersions>)
    org.elasticsearch.cluster.ClusterState.Builder.putTransportVersion(String, TransportVersion)
    org.elasticsearch.cluster.ClusterStateTaskExecutor.TaskContext.success(Consumer<ClusterState>)
    org.elasticsearch.cluster.ClusterStateTaskExecutor.TaskContext.success(Consumer<ClusterState>, ClusterStateAckListener)
    org.elasticsearch.cluster.service.ClusterService.submitUnbatchedStateUpdateTask(String, ClusterStateUpdateTask)
    org.elasticsearch.cluster.service.MasterService.submitUnbatchedStateUpdateTask(String, ClusterStateUpdateTask)
    org.elasticsearch.common.network.NetworkUtils.sortAddresses(List<InetAddress>)
    remove this when multihoming is really correct
    org.elasticsearch.common.Rounding.nextRoundingValue(long)
    Prefer Rounding.prepare(long, long) and then Rounding.Prepared.nextRoundingValue(long)
    org.elasticsearch.common.Rounding.offset()
    We're in the process of abstracting offset *into* Rounding so keep any usage to migratory shims
    org.elasticsearch.common.Rounding.round(long)
    Prefer Rounding.prepare(long, long) and then Rounding.Prepared.round(long)
    org.elasticsearch.common.settings.SecureSetting.insecureString(String)
    only used by S3 repository module insecure credentials functionality
    org.elasticsearch.common.Strings.toString(ChunkedToXContent)
    don't add usages of this method, it will be removed eventually TODO: remove this method, it makes no sense to turn potentially very large chunked xcontent instances into a string
    org.elasticsearch.common.Strings.toString(ChunkedToXContent, boolean, boolean)
    don't add usages of this method, it will be removed eventually TODO: remove this method, it makes no sense to turn potentially very large chunked xcontent instances into a string
    org.elasticsearch.common.unit.ByteSizeValue.bytesAsInt()
    org.elasticsearch.common.util.FeatureFlag.legacyRegisteredFlag(String)
    Use FeatureFlag(String) instead
    org.elasticsearch.common.xcontent.XContentHelper.convertToJson(BytesReference, boolean)
    org.elasticsearch.common.xcontent.XContentHelper.convertToJson(BytesReference, boolean, boolean)
    org.elasticsearch.common.xcontent.XContentHelper.convertToMap(BytesReference, boolean)
    this method relies on auto-detection of content type. Use XContentHelper.convertToMap(BytesReference, boolean, XContentType) instead with the proper XContentType
    org.elasticsearch.common.xcontent.XContentHelper.createParser(NamedXContentRegistry, DeprecationHandler, BytesReference)
    use XContentHelper.createParser(XContentParserConfiguration, BytesReference, XContentType) to avoid content type auto-detection
    org.elasticsearch.common.xcontent.XContentHelper.createParser(NamedXContentRegistry, DeprecationHandler, BytesReference, XContentType)
    use XContentHelper.createParser(XContentParserConfiguration, BytesReference, XContentType)
    org.elasticsearch.common.xcontent.XContentHelper.createParser(XContentParserConfiguration, BytesReference)
    use XContentHelper.createParser(XContentParserConfiguration, BytesReference, XContentType) to avoid content type auto-detection
    org.elasticsearch.common.xcontent.XContentHelper.parseToType(CheckedFunction<XContentParser, T, IOException>, BytesReference, XContentType, XContentParserConfiguration)
    if is null, this method relies on auto-detection of content type. Provide a non-null XContentType instead.
    org.elasticsearch.common.xcontent.XContentHelper.writeRawField(String, BytesReference, XContentBuilder, ToXContent.Params)
    use XContentHelper.writeRawField(String, BytesReference, XContentType, XContentBuilder, Params) to avoid content type auto-detection
    org.elasticsearch.common.xcontent.XContentHelper.xContentType(BytesReference)
    the content type should not be guessed except for few cases where we effectively don't know the content type. The REST layer should move to reading the Content-Type header instead. There are other places where auto-detection may be needed. This method is deprecated to prevent usages of it from spreading further without specific reasons.
    org.elasticsearch.common.xcontent.XContentHelper.xContentTypeMayCompressed(BytesReference)
    the content type should not be guessed except for few cases where we effectively don't know the content type. The REST layer should move to reading the Content-Type header instead. There are other places where auto-detection may be needed. This method is deprecated to prevent usages of it from spreading further without specific reasons.
    org.elasticsearch.index.mapper.DocumentParserContext.switchParser(XContentParser)
    we are actively deprecating and removing the ability to pass complex objects to multifields, so try and avoid using this method Replace the XContentParser used by this context
    org.elasticsearch.index.mapper.GeoShapeQueryable.geoShapeQuery(SearchExecutionContext, String, SpatialStrategy, ShapeRelation, Geometry)
    org.elasticsearch.index.mapper.MapperService.isMetadataFieldStatic(String)
    Use an instance method isMetadataField instead
    org.elasticsearch.index.query.AbstractQueryBuilder.printBoostAndQueryName(XContentBuilder)
    use AbstractQueryBuilder.boostAndQueryNameToXContent(org.elasticsearch.xcontent.XContentBuilder)
    org.elasticsearch.index.query.QueryBuilders.geoPolygonQuery(String, List<GeoPoint>)
    use QueryBuilders.geoIntersectionQuery(String, Geometry) instead
    org.elasticsearch.index.reindex.AbstractBulkByScrollRequestBuilder.size(int)
    please use maxDocs(int) instead.
    org.elasticsearch.index.reindex.ReindexRequest.addSortField(String, SortOrder)
    Specifying a sort field for reindex is deprecated. If using this in combination with maxDocs, consider using a query filter instead.
    org.elasticsearch.indices.SystemIndexDescriptor.getDescriptorCompatibleWith(Version)
    org.elasticsearch.indices.SystemIndexDescriptor.getMappingsNodeVersion()
    org.elasticsearch.indices.SystemIndexDescriptor.getMinimumNodeVersionMessage(String)
    org.elasticsearch.plugins.ClusterPlugin.getShardsAllocators(Settings, ClusterSettings)
    org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder.compression()
    org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder.compression(double)
    org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder.method()
    org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder.method(PercentilesMethod)
    org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder.numberOfSignificantValueDigits()
    org.elasticsearch.search.aggregations.metrics.AbstractPercentilesAggregationBuilder.numberOfSignificantValueDigits(int)
    org.elasticsearch.search.aggregations.metrics.PercentilesConfig.fromLegacy(PercentilesMethod, double, int)
  • Deprecated Constructors
    Constructor
    Description
    org.elasticsearch.action.support.HandledTransportAction(String, boolean, TransportService, ActionFilters, Writeable.Reader<Request>)
    always specify an executor
    org.elasticsearch.action.support.HandledTransportAction(String, TransportService, ActionFilters, Writeable.Reader<Request>)
    always specify an executor
    org.elasticsearch.common.settings.SecureString(String)
    Only use for compatibility between deprecated string settings and new secure strings
    org.elasticsearch.index.query.GeoPolygonQueryBuilder(String, List<GeoPoint>)
    org.elasticsearch.plugins.SearchPlugin.AggregationSpec(String, Writeable.Reader<? extends AggregationBuilder>, Aggregator.Parser)
    Use the ctor that takes a ContextParser instead
    org.elasticsearch.plugins.SearchPlugin.AggregationSpec(ParseField, Writeable.Reader<? extends AggregationBuilder>, Aggregator.Parser)
    Use the ctor that takes a ContextParser instead
    org.elasticsearch.plugins.SearchPlugin.PipelineAggregationSpec(String, Writeable.Reader<? extends PipelineAggregationBuilder>, PipelineAggregator.Parser)
    prefer the ctor that takes a ContextParser
    org.elasticsearch.plugins.SearchPlugin.PipelineAggregationSpec(ParseField, Writeable.Reader<? extends PipelineAggregationBuilder>, PipelineAggregator.Parser)
    prefer the ctor that takes a ContextParser
  • Deprecated Enum Constants
    Enum Constant
    Description
    org.elasticsearch.index.translog.Translog.Operation.Type.CREATE
    org.elasticsearch.search.aggregations.bucket.histogram.DateIntervalWrapper.IntervalTypeEnum.LEGACY_DATE_HISTO
    org.elasticsearch.search.aggregations.bucket.histogram.DateIntervalWrapper.IntervalTypeEnum.LEGACY_INTERVAL