|
Hibernate Search Migration Guide
Hibernate Search 3.1.0.Beta1DependenciesHibernate Search 3.1 depends on Hibernate Core 3.3, and is integrated with Hibernate Annotations 3.4 The logging system has moved to slf4j The Lucene version must be 2.3 and above Configurationoptimizations features involving Lucene tuning are now under hibernate.search.[default|<indexname>].indexwriter.[transaction|batch] QueryFullTextQuery.BOOST is now deprecated, it always returned 1 and had no concrete usage Search.createFullTextSession and Search.createFullTextEntityManager are deprecated and replaced by Search.getFullTextSession and Search.getFullTextEntityManager Indexhibernate.search.worker.batch_size is deprecated in favor to the fullTextSession.flushToIndexes(); Calling fullTextSession.index / purge: raises an exception if the entity is not indexable rather than the previous noop. Bridgeif you implement org.hibernate.search.bridge.FieldBridge or org.hibernate.search.bridge.TwoWayFieldBridge, the method set() has evolved to the following signature void set(String name, Object value, Document document, LuceneOptions luceneOptions) Hibernate Search 3.0.0.GAQueryquery.setIndexProjection has been removed (after deprecation), the replaced method is query.setProjection Hibernate Search 3.0.0.CR1DirectoryProviderDirectoryProvider has a new method start() Mappings@Text, @Keyword and @Unstored have been removed Hibernate Search 3.0.0.Beta4Mappings@Text, @Keyword etc have been deprecated for a while, they will be removed in the next release. QueryfullTextQuery.setIndexProjection() has been renamed fullTextQuery.setProjection() The default reader strategy is now shared (this should not affect the compatibility though) SearchFactoryContextHelper.getSearchFactory is deprecated, prefer fullTextSession.getSearchFactory(); searchFactory.getDirectoryProvider(Class) is now searchFactory.getDirectoryProviders(Class) LuceneLucene Core 2.2 is now used: your index structure will be automatically migrated by Lucene. Hibernate Search 3.0.0.Beta2QueryAll org.hibernate.search.query.FullTextQueryImpl casting should be replaced by org.hibernate.search.FullTextQuery casting resultSize() has been renamed getResultSize() Queries restricting to one entity now use one SQL query rather than depending on @BatchSize() when list() is used, the major impact is that it's going to be faster :) Query query = fullTextSession.createFullTextQuery(luceneQuery, book.class); query.list(); IndexingThe build phase for Lucene Documents is now done in the beforeCompletion phase of a transaction, making the process insensible to LazyInitializationException. There should be no impact to users that did not hit the bug. Previous versionsCheck the Java Persistence Migration Guide for migrations from previous versions of Hibernate Search (formerly known as Hibernate Annotations) |
||||||||