-
Deprecated InterfacesInterfaceDescriptionInstead of using Hibernate Search 5 APIs, get a
SearchSessionusingSearch.session(Session). Refer to the migration guide for more information.Will be removed without replacement, as Hibernate Search sessions (SearchSession) no longer extend JPA'sEntityManagerinterface or Hibernate ORM'sSession. To get access to a Hibernate Search 6 session, useSearch.session(Session).Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), then create aSearchQuerywithSearchSession.search(Class). If you really need an adapter to JPA'sQuery, convert thatSearchQueryusingSearch.toJpaQuery(SearchQuery), but be aware that only part of the contract is implemented. Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(Session), then create a mass indexer withSearchSession.massIndexer(Class[]). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchMappingusingSearch.mapping(javax.persistence.EntityManagerFactory), orSearch.mapping(SessionFactory). See the individual methods for the replacement of each method. Refer to the migration guide for more information.
-
Deprecated MethodsMethodDescriptionInstead of using Hibernate Search 5 APIs, get a
SearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and define your loading options usingSearchQueryOptionsStep.loading(Consumer). To set the equivalent toFullTextQuery.setFetchSize(int)in Hibernate Search 6, useSearchLoadingOptionsStep.fetchSize(int). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(Session), create a search query withSearchSession.search(Class), and define your projections usingSearchQuerySelectStep.select(Function). See in particular the composite projection, which allows applying a function to another projection:SearchProjectionFactory.composite(). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), then create aSearchQuerywithSearchSession.search(Class). If you really need an adapter to Hibernate ORM'sQuerytype, convert thatSearchQueryusingSearch.toOrmQuery(SearchQuery), but be aware that only part of the contract is implemented. Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(Session), then create a mass indexer withSearchSession.massIndexer(Class[]). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), then get the indexing plan for that session usingSearchSession.indexingPlan(), then force the immediate execution of indexing operations usingSearchIndexingPlan.execute().See the deprecation note onSearchFactory.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), then get the indexing plan for that session usingSearchSession.indexingPlan(), then add/update/remove entities to/from the index usingSearchIndexingPlan.addOrUpdate(Object),SearchIndexingPlan.delete(Object), orSearchIndexingPlan.purge(Class, Object, String).To purge all instances of a given type, see the deprecation note onFullTextEntityManager.purgeAll(Class). To purge a specific instance, instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), then get the indexing plan for that session usingSearchSession.indexingPlan(), then add/update/remove entities to/from the index usingSearchIndexingPlan.addOrUpdate(Object),SearchIndexingPlan.delete(Object), orSearchIndexingPlan.purge(Class, Object, String).Instead of using Hibernate Search 5 APIs, get aSearchScopeusingSearchSession.scope(Class)orSearchMapping.scope(Class), then aSearchWorkspaceusingSearchScope.workspace(), then callSearchWorkspace.purge()to purge all indexes in scope.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), convert it to aLuceneSearchQueryby passingLuceneExtension.get()toSearchQuery.extension(SearchQueryExtension), and get the explanation usingLuceneSearchQuery.explain(Object). Note theexplainmethods now expect an entity ID, not the internal Lucene docId. Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and define your facets (now called aggregations) usingSearchQueryOptionsStep.aggregation(AggregationKey, Function). You can then fetch the query result usingSearchFetchable.fetch(Integer)and get each aggregation usingSearchResult.aggregation(AggregationKey). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and get the total hit count ("result size") usingSearchFetchable.fetchTotalHitCount(). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), set a "truncation" timeout usingSearchQueryOptionsStep.truncateAfter(long, TimeUnit), and get theSearchResultwithSearchFetchable.fetch(Integer). You'll be able to check whether the result is partial or not usingSearchResult.timedOut(). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and define your loading options usingSearchQueryOptionsStep.loading(Consumer). To set the equivalent toObjectLookupMethodin Hibernate Search 6, useSearchLoadingOptionsStep.cacheLookupStrategy(EntityLoadingCacheLookupStrategy). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), set a "truncation" timeout usingSearchQueryOptionsStep.truncateAfter(long, TimeUnit), and get theSearchResultwithSearchFetchable.fetch(Integer). You'll be able to check whether the result is partial or not usingSearchResult.timedOut(). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and pass the hit offset ("firstResult") when fetching results usingSearchFetchable.fetch(Integer),SearchFetchable.fetch(Integer, Integer),SearchFetchable.fetchHits(Integer)orSearchFetchable.fetch(Integer, Integer).Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and pass the hit limit ("maxResults") when fetching results usingSearchFetchable.fetch(Integer),SearchFetchable.fetch(Integer, Integer),SearchFetchable.fetchHits(Integer)orSearchFetchable.fetch(Integer, Integer).Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and define your projections usingSearchQuerySelectStep.select(Function). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and define your projections usingSearchQuerySelectStep.select(Function). See in particular the composite projection, which allows applying a function to another projection:SearchProjectionFactory.composite(). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and define your sorts usingSearchQueryOptionsStep.sort(Function). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and define your projections usingSearchQuerySelectStep.select(Function). See in particular the distance projection:SearchProjectionFactory.distance(String, GeoPoint). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and define your projections usingSearchQuerySelectStep.select(Function). See in particular the distance projection:SearchProjectionFactory.distance(String, GeoPoint). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchSessionusingSearch.session(EntityManager), create a search query withSearchSession.search(Class), and set a "failure" timeout usingSearchQueryOptionsStep.failAfter(long, TimeUnit). Refer to the migration guide for more information.UseSearch.session(EntityManager)instead.Being ignored: this method will be removed.UseSearch.session(Session)instead.See the deprecation note onQueryBuilderfor predicates ("queries")SortContextfor sorts,FacetContextfor aggregations ("facets").Instead of using Hibernate Search 5 APIs, get aSearchMappingusingSearch.mapping(javax.persistence.EntityManagerFactory), orSearch.mapping(SessionFactory), then get access to the entity metadata usingSearchMapping.indexedEntity(Class), then get the corresponding index usingSearchIndexedEntity.indexManager(), then convert it to aLuceneIndexManagerusingIndexManager.unwrap(Class), then get the analyzer usingLuceneIndexManager.searchAnalyzer(). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchMappingusingSearch.mapping(javax.persistence.EntityManagerFactory), orSearch.mapping(SessionFactory), then get access to the backend usingSearchMapping.backend(), then convert it to aLuceneBackendusingBackend.unwrap(Class), then get the analyzer usingLuceneBackend.analyzer(String). Refer to the migration guide for more information.Instead of using Hibernate Search 5 APIs, get aSearchMappingusingSearch.mapping(javax.persistence.EntityManagerFactory), orSearch.mapping(SessionFactory), then get access to the entity metadata usingSearchMapping.allIndexedEntities().Instead of using Hibernate Search 5 APIs, get aSearchScopeusingSearchSession.scope(Class)orSearchMapping.scope(Class), then aSearchWorkspaceusingSearchScope.workspace(), then callSearchWorkspace.mergeSegments()to "optimize" all indexes in scope.Instead of using Hibernate Search 5 APIs, get aSearchScopeusingSearchSession.scope(Class)orSearchMapping.scope(Class), then aSearchWorkspaceusingSearchScope.workspace(), then callSearchWorkspace.mergeSegments()to "optimize" all indexes in scope.
SearchSessionusingSearch.session(Session), then create aSearchQuerywithSearchSession.search(Class). If you really need an adapter to Hibernate ORM'sQuerytype, convert thatSearchQueryusingSearch.toOrmQuery(SearchQuery), but be aware that only part of the contract is implemented. Refer to the migration guide for more information.