# Deprecated API

## Contents

- Deprecated Interfaces
- Deprecated Classes
- Deprecated Enums
- Deprecated Annotation Types
- Deprecated Methods
- Deprecated Constructors
- Deprecated Enum Constants
- Deprecated Annotation Type Elements

- Deprecated Interfaces
  Interface and Description
  org.hibernate.search.engine.BoostStrategy Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
  org.hibernate.search.store.IndexShardingStrategy Deprecated as of Hibernate Search 4.4. Might be removed in Search 5. Use `ShardIdentifierProvider` instead.
  org.hibernate.search.store.Workspace This interface will be moved and should be considered non-public API [HSEARCH-1915]

- Deprecated Classes
  Class and Description
  org.hibernate.search.engine.impl.DefaultBoostStrategy
  org.hibernate.search.filter.FilterKey Custom filter keys are deprecated and are scheduled for removal in Hibernate Search 6. As of Hibernate Search 5.1, keys for caching Lucene filters are calculated automatically based on the given filter parameters.
  org.hibernate.search.filter.StandardFilterKey Custom filter keys are deprecated and are scheduled for removal in Hibernate Search 6. As of Hibernate Search 5.1, keys for caching Lucene filters are calculated automatically based on the given filter parameters.

- Deprecated Enums
  Enum and Description
  org.hibernate.search.annotations.FieldCacheType Remove the annotation. No alternative replacement necessary.

- Deprecated Annotation Types
  Annotation Type and Description
  org.hibernate.search.annotations.Boost Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
  org.hibernate.search.annotations.CacheFromIndex Remove the annotation. No alternative replacement necessary.
  org.hibernate.search.annotations.DynamicBoost Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
  org.hibernate.search.annotations.Key Custom filter cache keys are a deprecated feature scheduled to be removed in Hibernate Search 6. As of Hibernate Search 5.1, filter cache keys will be determinated automatically based on the filter parameters. Custom filter cache key methods should therefore be removed.
  org.hibernate.search.annotations.ProvidedId with no replacement: this annotation will be removed.

- Deprecated Methods
  Method and Description
  org.hibernate.search.filter.FilterCachingStrategy.addCachedFilter(FilterKey, Filter) This method is not used by Hibernate Search anymore and will be removed in a future version. Please implement `FilterCachingStrategy.addCachedFilter(FilterKey, Query)` instead.
  org.hibernate.search.query.dsl.sort.SortAdditionalSortFieldContext.andByField(String, SortField.Type) Using this method shouldn't be needed if your custom field bridges implement `MetadataProvidingFieldBridge`. Use `SortAdditionalSortFieldContext.andByField(String)` instead.
  org.hibernate.search.FullTextSharedSessionBuilder.autoClose(boolean)
  org.hibernate.search.query.dsl.sort.SortContext.byField(String, SortField.Type) Using this method shouldn't be needed if your custom field bridges implement `MetadataProvidingFieldBridge`. Use `SortContext.byField(String)` instead.
  org.hibernate.search.cfg.IndexedMapping.cacheFromIndex(FieldCacheType...) This will be removed with no replacement.
  org.hibernate.search.FullTextSharedSessionBuilder.connectionReleaseMode()
  org.hibernate.search.FullTextSharedSessionBuilder.connectionReleaseMode(ConnectionReleaseMode)
  org.hibernate.search.cfg.EntityMapping.dynamicBoost(Class<? extends BoostStrategy>) Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
  org.hibernate.search.cfg.IndexedMapping.dynamicBoost(Class<? extends BoostStrategy>) Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
  org.hibernate.search.cfg.PropertyMapping.dynamicBoost(Class<? extends BoostStrategy>) Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
  org.hibernate.search.engine.impl.DocumentBuilderHelper.extractObjectFromFieldable(IndexableField) we should know the projection rules from the metadata rather than guess from the field properties
  org.hibernate.search.engine.impl.DocumentBuilderHelper.extractStringFromFieldable(IndexableField) we should know the projection rules from the metadata rather than guess from the field properties
  org.hibernate.search.query.engine.spi.HSQuery.filter(Filter) use the `FullTextFilterDef` approach, or handle filtering when building the query (see `BooleanJunction.must(Query)` and `MustJunction.disableScoring()`).
  org.hibernate.search.query.engine.impl.AbstractHSQuery.filter(Filter)
  org.hibernate.search.FullTextSharedSessionBuilder.flushBeforeCompletion()
  org.hibernate.search.FullTextSharedSessionBuilder.flushBeforeCompletion(boolean)
  org.hibernate.search.spi.IndexedTypeMap.get(Class<?>) use `IndexedTypeMap.get(IndexedTypeIdentifier)`. This method will be removed.
  org.hibernate.search.bridge.LuceneOptions.getBoost() Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
  org.hibernate.search.engine.impl.LuceneOptionsImpl.getBoost()
  org.hibernate.search.cfg.EntityDescriptor.getCacheInMemory() This will be removed with no replacement.
  org.hibernate.search.store.impl.DirectoryProviderHelper.getCopyBufferSize(String, Properties) the configured chunk size is actually no longer useful and will be ignored.
  org.hibernate.search.metadata.impl.IndexedTypeDescriptorImpl.getDynamicBoost()
  org.hibernate.search.metadata.impl.IndexedTypeDescriptorForUnindexedType.getDynamicBoost()
  org.hibernate.search.metadata.IndexedTypeDescriptor.getDynamicBoost() Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
  org.hibernate.search.backend.LuceneWork.getEntityClass() use `LuceneWork.getEntityType()`: this method will be removed!
  org.hibernate.search.query.engine.spi.HSQuery.getExtendedSearchIntegrator() should be at most SearchIntegrator, preferably removed altogether
  org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.getFieldCacheOption()
  org.hibernate.search.engine.metadata.impl.PropertyMetadata.getFieldMetadata() use getFieldMetadataSet() instead
  org.hibernate.search.query.dsl.impl.AbstractFacet.getFieldName() Use `AbstractFacet.getFacetFieldName()` instead.
  org.hibernate.search.backend.impl.lucene.IndexWriterDelegate.getIndexWriter()
  org.hibernate.search.spi.IndexedTypeIdentifier.getPojoType() This only exists to facilitate an iterative integration, and will be removed ASAP.
  org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.getReturnAliases()
  org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.getReturnTypes()
  org.hibernate.search.engine.impl.ImmutableSearchFactory.getSafeIndexBindingForEntity(Class<?>)
  org.hibernate.search.indexes.spi.IndexManager.getSerializer() This method is scheduled for removal. It is not invoked by Hibernate Search any more, implementations may make this a no-op and safely return null.
  org.hibernate.search.metadata.impl.IndexedTypeDescriptorImpl.getStaticBoost()
  org.hibernate.search.metadata.impl.IndexedTypeDescriptorForUnindexedType.getStaticBoost()
  org.hibernate.search.metadata.IndexedTypeDescriptor.getStaticBoost() Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
  org.hibernate.search.metadata.impl.IndexedTypeDescriptorForUnindexedType.getType()
  org.hibernate.search.metadata.IndexedTypeDescriptor.getType() Use `IndexedTypeDescriptor.getIndexedType()` instead. This method will be removed.
  org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.getTypeMetadataFor(Class<?>, IndexManagerType)
  org.hibernate.search.backend.spi.BackendQueueProcessor.initialize(Properties, WorkerBuildContext, IndexManager) Use a `Backend` implementation and implement your initialization logic in `Backend.createQueueProcessor(IndexManager, WorkerBuildContext)` instead.
  org.hibernate.search.backend.impl.LocalBackendQueueProcessor.initialize(Properties, WorkerBuildContext, IndexManager) Provided so that passing the LocalBackendQueueProcessor class as the value of the "backend" configuration option still works, but normally the "local" string should be used instead, in which case this method is not used.
  org.hibernate.search.cfg.ContainedInMapping.numericField() Invoke `field().numericField()` instead.
  org.hibernate.search.spi.IndexedTypeMap.put(IndexedTypeIdentifier, V) This method will be removed. The implementations will be refactored to become immutable.
  org.hibernate.search.cfg.EntityDescriptor.setCacheInMemory(Map<String, Object>) This will be removed with no replacement.
  org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.setEntity(int, Object)
  org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.setEntity(String, Object)
  org.hibernate.search.jpa.FullTextQuery.setFilter(Filter)
  org.hibernate.search.FullTextQuery.setFilter(Filter)
  org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.setFilter(Filter)
  org.hibernate.search.FullTextQuery.setResultTransformer(ResultTransformer)
  org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.setResultTransformer(ResultTransformer)
  org.hibernate.search.batchindexing.impl.MassIndexerImpl.threadsForSubsequentFetching(int)
  org.hibernate.search.MassIndexer.threadsForSubsequentFetching(int) Being ignored: this method will be removed.
  org.hibernate.search.spi.IndexedTypeSet.toPojosSet() This only exists to facilitate an iterative integration, and will be removed ASAP.
  org.hibernate.search.FullTextSharedSessionBuilder.transactionContext()
  org.hibernate.search.query.dsl.FuzzyContext.withThreshold(float) use `FuzzyContext.withEditDistanceUpTo(int)`

- Deprecated Constructors
  Constructor and Description
  org.hibernate.search.backend.impl.LocalBackendQueueProcessor() Provided so that passing the LocalBackendQueueProcessor class as the value of the "backend" configuration option still works, but normally the "local" string should be used instead, in which case the other constructor is used.
  org.hibernate.search.cfg.NumericFieldMapping(PropertyDescriptor, EntityDescriptor, SearchMapping) Do not use constructors, use `numericField` methods in other classes from the same package.
  org.hibernate.search.cfg.NumericFieldMapping(String, PropertyDescriptor, EntityDescriptor, SearchMapping) Do not use constructors, use `numericField` methods in other classes from the same package.

- Deprecated Enum Constants
  Enum Constant and Description
  org.hibernate.search.elasticsearch.schema.impl.model.IndexType.ANALYZED ES2 only.
  org.hibernate.search.backend.configuration.impl.IndexWriterSetting.MAX_THREAD_STATES
  org.hibernate.search.elasticsearch.schema.impl.model.IndexType.NO ES2 only.
  org.hibernate.search.elasticsearch.schema.impl.model.IndexType.NOT_ANALYZED ES2 only.
  org.hibernate.search.elasticsearch.schema.impl.model.DataType.STRING Only used in Elasticsearch 2.x. Use TEXT or KEYWORD instead.
  org.hibernate.search.backend.configuration.impl.IndexWriterSetting.TERM_INDEX_INTERVAL

- Deprecated Annotation Type Elements
  Annotation Type Element and Description
  org.hibernate.search.annotations.Spatial.boost Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
  org.hibernate.search.annotations.Field.boost Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved