diff --git a/rules/rules-reviewed/hibernate/hibernate-search.windup.xml b/rules/rules-reviewed/hibernate/hibernate-search.windup.xml new file mode 100644 index 000000000..b80cae175 --- /dev/null +++ b/rules/rules-reviewed/hibernate/hibernate-search.windup.xml @@ -0,0 +1,1490 @@ + + + + + + This ruleset provides rules to support the migration to hibernate search 6.0. Developed under WINDUPRULE-900 + + + + + + + + hibernate + eap8 + + + + + + + + + + + + + + In Hibernate Search 6, constants are provided through classes whose name ends with Settings. Follow link for more details. + + + + + + + + + + + This property is not available anymore. To override the default analyzer, define a custom analyzer named default. See link. + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.enabled`. + + + + + + + + + + + + No direct equivalent in Hibernate Search 6. This property was not documented in Hibernate Search 5. For the specific use case of batch processes, know that upon Hibernate ORM session flushes, + Hibernate Search 6 will automatically turn entities to documents and hold documents in memory until the transaction commit. + + See links for more information. + + + + + + + + + + + + + + AWS configuration properties must change from `hibernate.search.default.elasticsearch.aws.*` to `hibernate.search.backend.aws.*`. + See link for more information about credential configuration changes. + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.connection_timeout`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.default.elasticsearch.discovery.default_scheme`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.discovery.enabled`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.discovery.refresh_interval`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.dynamic_mapping` (for global defaults) + or `hibernate.search.backend.indexes.<index-name>.dynamic_mapping` (per-index). + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.uris`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.schema_management.minimal_required_status_wait_timeout` (for global defaults) + or `hibernate.search.backend.indexes.<index-name>.schema_management.minimal_required_status_wait_timeout` (per-index). + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.schema_management.strategy` (for global defaults). There is no equivalent for per-index configuration. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.max_connections_per_route`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.max_connections`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.password`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.path_prefix`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.read_timeout`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.automatic_indexing.synchronization.strategy` (for global defaults). There is no equivalent for per-index configuration. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.request_timeout`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.schema_management.minimal_required_status` (for global defaults) + or `hibernate.search.backend.indexes.<index-name>.schema_management.minimal_required_status` (per-index). + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.username`. + + + + + + + + + + + This property is not available anymore. There is no substitute in Hibernate Search 6. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.directory.type` (for global defaults) + or `hibernate.search.backend.indexes.<index-name>.directory.type` (per-index). + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.directory.root` (for global defaults) + or `hibernate.search.backend.indexes.<index-name>.directory.root` (per-index). + + + + + + + + + + + + No equivalent in Hibernate Search 6. The name of an index can still be customized in the mapping, using + @Indexed(name = ...), or with the programmatic equivalent. + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.io.commit_interval` (for global defaults) + or `hibernate.search.backend.indexes.<index name>.io.commit_interval` (per-index). + + + + + + + + + + + + No equivalent in Hibernate Search 6. This property was not documented in Hibernate Search 5. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.type` (for global defaults). + No equivalent for the per-index configuration. See link for more information. + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.io.writer` or `hibernate.search.backend.io.merge` (for global defaults) + or `hibernate.search.backend.indexes.<index-name>.io.writer` or `hibernate.search.backend.indexes.<index-name>.io.merge` (per-index). + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.directory.locking.strategy` (for global defaults) + or `hibernate.search.backend.indexes.<index-name>.directory.locking.strategy` (per-index). + + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.indexing.queue_size` (for global defaults) + or `hibernate.search.backend.indexes.<index-name>.indexing.queue_size` (per-index). + + + + + + + + + + + + No equivalent in Hibernate Search 6. In most cases, you won’t need to use indexNullAs anymore. Where indexNullAs is still needed, define the token explicitly for each index field. See links for more info. + + + + + + + + + + + + + No direct equivalent in Hibernate Search 6. To enable async reader refresh, set hibernate.search.backend.io.refresh_interval or hibernate.search.backend.indexes.<index-name>.io.refresh_interval + to a strictly positive value (in milliseconds). See links for more information. Custom reader strategies are no longer supported. + + + + + + + + + + + + + This property is not available anymore. The filesystem-slave directory provider is no longer supported. See links for more information. + + + + + + + + + + + + This property is not available anymore. Sharding is configured differently. See links for more information. + + + + + + + + + + + + This property is not available anymore. The similarity is configured through the analysis configurer. See links for more information. + + + + + + + + + + + + This property is not available anymore. The JMS/JGroups backends are no longer supported. See links for more information. + + + + + + + + + + + + This property is not available anymore. Setting hibernate.search.automatic_indexing.synchronization.strategy to async or sync will produce results similar to setting hibernate.search.<index-name>.worker.execution to the same value. See links for more information. + + + + + + + + + + + + This property is not available anymore. The JMS/JGroups backends are no longer supported. See links for more information. + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.analysis.configurer`. + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.log.json_pretty_printing`. + + + + + + + + + + + This property is not available anymore: scrolling is forward-only. See links for more information. + + + + + + + + + + + + This property is not available anymore. When using Hibernate Search APIs, the "chunk size" is an argument to the scroll method. When using the Hibernate ORM or JPA adapters, the "chunk size" is set to the same value as the fetch size. See links for more information. + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.scroll_timeout`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.automatic_indexing.enable_dirty_check`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.background_failure_handler`. A different interface should be implemented: see links for more information. + + + + + + + + + + + + This property is not available anymore. There's no equivalent for Hibernate Search 6. If you need caching for some of your Lucene queries, consider upgrading directly to Hibernate Search 6.1, which provides configurable Low-level hit caching. See link for more information. + + + + + + + + + + + + + This property is not available anymore. There's no equivalent for Hibernate Search 6. If you need caching for some of your Lucene queries, consider upgrading directly to Hibernate Search 6.1, which provides configurable Low-level hit caching. See link for more information. + + + + + + + + + + + + + This property is not available anymore. There's no equivalent for Hibernate Search 6. No equivalent in Hibernate Search 6. See links for more information. + + + + + + + + + + + + Index uninverting was deprecated in Hibernate Search 5 due to poor performance and is no longer allowed. All index fields that you want to sort on must be marked as sortable. See links for more information. + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.automatic_indexing.strategy`. Set to `none` to get the equivalent of `hibernate.search.indexing_strategy = manual` in Hibernate Search 5. + + + + + + + + + + + This property is not available anymore. See links for more information. + + + + + + + + + + + + This property is not available anymore. See links for more information. + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.analysis.configurer`. A different interface should be implemented: see links for more information. + + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.backend.lucene_version`. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.mapping.configurer`. A different interface should be implemented: see links for more information. + + + + + + + + + + + + This property is no available anymore. No equivalent in Hibernate Search 6: entities are always loaded with a query. + + + + + + + + + + + This property is not available anymore. Substitute with the Hibernate Search 6 equivalent: `hibernate.search.query.loading.cache_lookup.strategy`. + + + + + + + + + + + + This property is not available anymore. There is no direct equivalent in Hibernate Search 6: the similarity is configured through the analysis configurer. The default similarity changed when this property is not configured: see links for more information. + + + + + + + + + + + + This property is not available anymore. No equivalent to the concept of "worker" in Hibernate Search 6: + automatic indexing is always performed on transaction commit or, when there is no transaction, on session flush. + Also, transactional backends, for example the JMS backend, are no longer supported. See links for more information. + + + + + + + + + + + + ANNOTATION + + + + + + In Hibernate Search 5, it was possible to apply an @Analyzer annotation to a class or property, so that the corresponding analyzer would be used by default for any index field declared in this scope. + There is no equivalent to that feature in Hibernate Search 6: all fields must specify their analyzer explicitly using @FullTextField(analyzer = "myAnalyzer"), or rely on the (global) default analyzer. + Also, still in Hibernate Search 5, @Analyzer could point directly to a class extending org.apache.lucene.analysis.Analyzer, for example with @Analyzer(impl = StandardAnalyzer.class). + This is no longer possible: analyzers are now always referenced by their name. However, you can assign a name to a given analyzer instance using the Lucene analysis configurer. + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + Annotation-based analyzer definitions are no longer supported. + Instead, implement an analysis configurer: see links for Lucene and Elasticsearch replacements. + + + + + + + + + + ANNOTATION + + + + + + `@AnalyzerDiscriminator` has no direct equivalent in Hibernate Search 6: the analyzer assigned to each field is static and cannot change at runtime, because that results in unreliable matches and in scoring issues. + Instead, Hibernate Search 6 allows declaring multiple index fields for a single property, and putting the content of that property in a different field depending on a discriminator. Then, when searching, you can target all fields at once. + See link for more information. + + + + + + + + + ANNOTATION + + + + + + Index-time boosting was deprecated in Hibernate Search 5. It is no longer available in Hibernate Search 6. + Instead, rely on query-time boosting. See link for more information. + + + + + + + + + ANNOTATION + + + + + + This annotation was deprecated and non-functional in Hibernate Search 5. It is no longer available in Hibernate Search 6. + + + + + + + + ANNOTATION + + + + + + `@CalendarBridge` is not necessary to index Calendar values: you can simply apply @GenericField to a property of type Calendar, and an appropriate default bridge will be used. + See link for more information. + + + + + + + + + ANNOTATION + + + + + + Annotation-based analyzer definitions are no longer supported. See link for more information. + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + The bridge API was completely reworked in Hibernate Search 6. See link for more information. + + + + + + + + + ANNOTATION + + + + + + @ContainedIn is no longer necessary in Hibernate Search 6. + Hibernate Search 6 infers indexing dependencies from the mapping, and raises errors at bootstrap when the equivalent of @ContainedIn cannot be applied automatically (for example an @IndexedEmbedded association with no inverse side). + Thus, the recommended approach when migrating is to simply remove all @ContainedIn annotations, then deal with the bootstrap errors, if any. + + + + + + + + + ANNOTATION + + + + + + @DateBridge is not necessary to index Date values: you can simply apply @GenericField to a property of type java.util.Date, java.sql.Date, java.sql.Time or java.sql.Timestamp, and an appropriate default bridge will be used. + See link for more information. + + + + + + + + + ANNOTATION + + + + + + `@DocumentId` is still available in Hibernate Search 6, but moved to a different package: `org.hibernate.search.mapper.pojo.mapping.definition.annotation.DocumentId`. + However, it no longer exposes a name attribute, because the document ID is no longer an index field, and thus it does not need a name. + + + + + + + + + ANNOTATION + + + + + + Index-time boosting was deprecated in Hibernate Search 5. It is no longer available in Hibernate Search 6. + Instead, rely on query-time boosting. See link for more information. + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + Facets are now called aggregations, which are a generalization of the concept of faceting. See link for more information. + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + The @Field annotation was split into multiple annotations, specific to each field type. See link for more information. + + + + + + + + + ANNOTATION + + + + + + The bridge API was completely reworked in Hibernate Search 6. See link for more information. + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + Full-text filters have no direct equivalent in Hibernate Search 6. See link for more information. + + + + + + + + + ANNOTATION + + + + + + `@Indexed` is still available in Hibernate Search 6, but moved to a different package: `org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed`. + However, there are some related changes that must be addressed - see link for more information. + + + + + + + + + ANNOTATION + + + + + + `@IndexedEmbedded` is still available in Hibernate Search 6, but moved to a different package: `org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexedEmbedded`. + Some other changes within the annotation have been made. For more information, see the link. + + + + + + + + + ANNOTATION + + + + + + `@Key` has no equivalent in Hibernate Search 6. + + + + + + + + + ANNOTATION + + + + + + `@Latitude` is still available in Hibernate Search 6, but moved to a different package: `org.hibernate.search.annotations.Latitude`. + + + + + + + + + ANNOTATION + + + + + + `@Longitude` is still available in Hibernate Search 6, but moved to a different package: `org.hibernate.search.annotations.Longitude`. + + + + + + + + + ANNOTATION + + + + + + In Hibernate Search 5, `@Normalizer` could point directly to a class extending `org.apache.lucene.analysis.Analyzer`, for example with `@Normalizer(impl = MyNormalizer.class)`. + This is no longer possible: normalizers are now always referenced by their name. However, you can assign a name to a given normalizer instance using the Lucene analysis configurer. + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + Annotation-based analyzer definitions are no longer supported. + Instead, implement an analysis configurer: see links for Lucene and Elasticsearch + + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + @NumericField no longer exists in Hibernate Search 6. + Numeric types are indexed as numeric values by default, so this annotation can simply be removed. + + + + + + + + ANNOTATION + + + + + + `@ProvidedId` was deprecated in Hibernate Search 5. It no longer exists in Hibernate Search 6. + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + @SortableField(s) no longer exists in Hibernate Search 6. Instead, use @*Field.sortable. + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + @Spatial has no direct equivalent in Hibernate Search 6. + Check link for a quick reference of how to convert a @Spatial annotation to Hibernate Search 6. + + + + + + + + + ANNOTATION + + + + + + @TikaBridge has no equivalent in Hibernate Search 6 yet. + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + Annotation-based analyzer definitions are no longer supported. + See links for more information. + + + + + + + + + + + + + + + + + + The equivalent to Hibernate Search 5’s `FullTextEntityManager/FullTextSession` is Hibernate Search 6’s `SearchSession`. Check link for guide + to switch implementation to `SearchSession`. + + + + + + + + + + + + + + + + Search APIs have changed significantly in order to implement several improvements. The recommended way to build search + queries in Hibernate Search 6 is through the Hibernate Search DSL. See link for a thorough explanation and examples. + + + + + + + + + + + + + Lucene queries are replaced with Lucene-independent "search predicates" in Hibernate Search 6. See link for guide and examples. + + + + + + + + + + + + + + + + Lucene sort fields are replaced with Lucene-independent "search sorts" in Hibernate Search 6. Follow the link for more info and examples. + + + + + + + + + + + + + + + + The `ProjectionConstants` are no longer available, and Hibernate Search 6's DSL must be used instead to build `SearchProjection` objects. Follow link for more information and examples. + + + + + + + + + + + + + + + + Facets are now called aggregations, which are a generalization of the concept of faceting. See link for more information and examples. + + + + + + + + + + + + + + + + The ErrorHandler interface and API have been replaced with the `FailureHandler` interface, and the related configuration properties changed. See link for more information and examples. + + + + + + + + + + ANNOTATION + + + + + + The @Factory annotation does not exist in Hibernate Search 6 anymore. It is encouraged instead to rely on a proper dependency injection framework if such a feature is needed. + This can be done by referencing the bean name instead of referencing the bean class in your Hibernate Search mapping/configuration. See link for more information. + + + + + + + + + + + + + + `org.hibernate.search.exception.SearchException` has been moved to `org.hibernate.search.util.common.SearchException`. + + + + + + + + + + + + + + + + + + Static sharding is still available in Hibernate Search 6, but it works differently, so the Hibernate Search 5 APIs are no longer available. + To implement static sharding in Hibernate Search 6, refer to the link. + + + + + + + + + + + + + + The equivalent to Hibernate Search 5’s SearchFactory is Hibernate Search 6’s SearchMapping, but some operations are more conveniently accessible directly from SearchSession. + Check the link for more information and examples. + + + + + + + + + + + + + The MassIndexer mostly stays the same in Hibernate Search 6, but it moved to a different package: `org.hibernate.search.mapper.orm.massindexing.MassIndexer`. + There are some other changes that can be checked by following the link. + + + + + + + + + + + + + The mass indexing Batch (JSR-352) job mostly stays the same in Hibernate Search 6, but `MassIndexingJob` moved to a different package: `org.hibernate.search.batch.jsr352.core.massindexing.MassIndexingJob`. + + + + + + + + + + + + + + + + + + + Hibernate Search 6 uses the groupId `org.hibernate.search` and all dependencies must be updated + + + + + + + \ No newline at end of file diff --git a/rules/rules-reviewed/hibernate/tests/.windup/cache/nexus-indexer-data/test.archive-metadata.txt b/rules/rules-reviewed/hibernate/tests/.windup/cache/nexus-indexer-data/test.archive-metadata.txt new file mode 100644 index 000000000..b0ee27d85 --- /dev/null +++ b/rules/rules-reviewed/hibernate/tests/.windup/cache/nexus-indexer-data/test.archive-metadata.txt @@ -0,0 +1 @@ +5a157b93c712b029fe14d23fcd17475e091a7c66 org.hibernate:hibernate-search-orm:5.11.0.Final \ No newline at end of file diff --git a/rules/rules-reviewed/hibernate/tests/data/hibernate-search/HibernateSearchTestClass.java b/rules/rules-reviewed/hibernate/tests/data/hibernate-search/HibernateSearchTestClass.java new file mode 100644 index 000000000..dc4ec07e9 --- /dev/null +++ b/rules/rules-reviewed/hibernate/tests/data/hibernate-search/HibernateSearchTestClass.java @@ -0,0 +1,155 @@ +import org.apache.lucene.search.Sort; +import org.apache.lucene.search.SortField; +import org.hibernate.search.FullTextQuery; +import org.hibernate.search.FullTextSession; +import org.hibernate.search.MassIndexer; +import org.hibernate.search.SearchFactory; +import org.hibernate.search.annotations.Analyzer; +import org.hibernate.search.annotations.AnalyzerDef; +import org.hibernate.search.annotations.AnalyzerDefs; +import org.hibernate.search.annotations.AnalyzerDiscriminator; +import org.hibernate.search.annotations.Boost; +import org.hibernate.search.annotations.CacheFromIndex; +import org.hibernate.search.annotations.CalendarBridge; +import org.hibernate.search.annotations.CharFilterDef; +import org.hibernate.search.annotations.ClassBridge; +import org.hibernate.search.annotations.ClassBridges; +import org.hibernate.search.annotations.ContainedIn; +import org.hibernate.search.annotations.DateBridge; +import org.hibernate.search.annotations.DocumentId; +import org.hibernate.search.annotations.DynamicBoost; +import org.hibernate.search.annotations.Facet; +import org.hibernate.search.annotations.Facets; +import org.hibernate.search.annotations.Factory; +import org.hibernate.search.annotations.Field; +import org.hibernate.search.annotations.FieldBridge; +import org.hibernate.search.annotations.Fields; +import org.hibernate.search.annotations.FullTextFilterDef; +import org.hibernate.search.annotations.FullTextFilterDefs; +import org.hibernate.search.annotations.Indexed; +import org.hibernate.search.annotations.IndexedEmbedded; +import org.hibernate.search.annotations.Key; +import org.hibernate.search.annotations.Latitude; +import org.hibernate.search.annotations.Longitude; +import org.hibernate.search.annotations.Normalizer; +import org.hibernate.search.annotations.NormalizerDef; +import org.hibernate.search.annotations.NormalizerDefs; +import org.hibernate.search.annotations.NumericField; +import org.hibernate.search.annotations.NumericFields; +import org.hibernate.search.annotations.ProvidedId; +import org.hibernate.search.annotations.Resolution; +import org.hibernate.search.annotations.SortableField; +import org.hibernate.search.annotations.SortableFields; +import org.hibernate.search.annotations.Spatial; +import org.hibernate.search.annotations.Spatials; +import org.hibernate.search.annotations.TikaBridge; +import org.hibernate.search.annotations.TokenFilterDef; +import org.hibernate.search.annotations.TokenizerDef; +import org.hibernate.search.cfg.Environment; +import org.hibernate.search.elasticsearch.ElasticsearchProjectionConstants; +import org.hibernate.search.elasticsearch.cfg.ElasticsearchEnvironment; +import org.hibernate.search.engine.BoostStrategy; +import org.hibernate.search.engine.ProjectionConstants; +import org.hibernate.search.engine.impl.FacetHandling; +import org.hibernate.search.exception.ErrorHandler; +import org.hibernate.search.exception.SearchException; +import org.hibernate.search.jpa.FullTextEntityManager; +import org.hibernate.search.store.IndexShardingStrategy; +import org.hibernate.search.store.ShardIdentifierProvider; +import org.hibernate.search.store.ShardIdentifierProviderTemplate; + +import java.util.Calendar; +import java.util.Date; + +@Analyzer +@AnalyzerDef(name = "name") +@AnalyzerDefs(value = HibernateSearchTestClass.class) +@AnalyzerDiscriminator(impl = HibernateSearchTestClass.class) +@Boost(value = 0.12f) +@CacheFromIndex +@CharFilterDef() +@ClassBridge() +@ClassBridges +@ContainedIn +@FullTextFilterDef(name = "filter", impl = HibernateSearchTestClass.class) +@FullTextFilterDefs() +@Indexed +@Normalizer +@NormalizerDef() +@NormalizerDefs() +@TikaBridge +@TokenFilterDef() +@TokenizerDef() +public class HibernateSearchTestClass implements BoostStrategy { + + @CalendarBridge(resolution = Resolution.DAY) + Calendar calendar; + + @DateBridge(resolution = Resolution.DAY) + @DynamicBoost(impl = HibernateSearchTestClass.class) + Date date; + + @DocumentId + @IndexedEmbedded + @NumericField + @NumericFields() + Integer id; + + @Facet + @Facets(value = "value") + @ProvidedId + @SortableField + @SortableFields() + String field1; + + @Field + @Fields() + @Spatial + @Spatials() + @Factory + String field2; + + @FieldBridge + @Latitude + @Longitude + String field3; + + @Key + public String method1() { + FullTextEntityManager fullTextEntityManager; + FullTextSession fullTextSession; + + FullTextQuery fullTextQuery; + org.hibernate.search.jpa.FullTextQuery fullTextQuery1; + + org.apache.lucene.search.Query q; + + Sort sort; + SortField sortField; + + ProjectionConstants projectionConstants; + ElasticsearchProjectionConstants elasticsearchProjectionConstants; + + FacetHandling facetHandling; + + ErrorHandler errorHandler; + + SearchException e; + + IndexShardingStrategy indexShardingStrategy; + ShardIdentifierProvider shardIdentifierProvider; + ShardIdentifierProviderTemplate shardIdentifierProviderTemplate; + + SearchFactory searchFactory; + + MassIndexer massIndexer; + org.hibernate.search.jsr352.massindexing.MassIndexingJob massIndexingJob; + + return ""; + } + + Environment environment; + + ElasticsearchEnvironment elasticsearchEnvironment; +} + diff --git a/rules/rules-reviewed/hibernate/tests/data/hibernate-search/hibernate-search-orm-5.11.0.Final.jar b/rules/rules-reviewed/hibernate/tests/data/hibernate-search/hibernate-search-orm-5.11.0.Final.jar new file mode 100644 index 000000000..6bcdccdee Binary files /dev/null and b/rules/rules-reviewed/hibernate/tests/data/hibernate-search/hibernate-search-orm-5.11.0.Final.jar differ diff --git a/rules/rules-reviewed/hibernate/tests/data/hibernate-search/hibernate-search.properties b/rules/rules-reviewed/hibernate/tests/data/hibernate-search/hibernate-search.properties new file mode 100644 index 000000000..6de79827d --- /dev/null +++ b/rules/rules-reviewed/hibernate/tests/data/hibernate-search/hibernate-search.properties @@ -0,0 +1,86 @@ +hibernate.search.analyzer=aRandomValue +hibernate.search.autoregister_listeners=aRandomValue +hibernate.search.batch_size=aRandomValue +hibernate.search.default.elasticsearch.aws.*=aRandomValue +hibernate.search.default.elasticsearch.connection_timeout=aRandomValue +hibernate.search.default.elasticsearch.discovery.default_scheme=aRandomValue +hibernate.search.default.elasticsearch.discovery.enabled=aRandomValue +hibernate.search.default.elasticsearch.discovery.refresh_interval=aRandomValue +hibernate.search.default.elasticsearch.dynamic_mapping=aRandomValue +hibernate.search.default.elasticsearch.host=aRandomValue +hibernate.search.default.elasticsearch.index_management_wait_timeout=aRandomValue +hibernate.search.default.elasticsearch.index_schema_management_strategy=aRandomValue +hibernate.search.default.elasticsearch.max_total_connection_per_route=aRandomValue +hibernate.search.default.elasticsearch.max_total_connection=aRandomValue +hibernate.search.default.elasticsearch.password=aRandomValue +hibernate.search.default.elasticsearch.path_prefix=aRandomValue +hibernate.search.default.elasticsearch.read_timeout=aRandomValue +hibernate.search.default.elasticsearch.refresh_after_write=aRandomValue +hibernate.search.default.elasticsearch.request_timeout=aRandomValue +hibernate.search.default.elasticsearch.required_index_status=aRandomValue +hibernate.search.default.elasticsearch.username=aRandomValue +hibernate.search.default.exclusive_index_use=aRandomValue +hibernate.search.default.directory_provider=aRandomValue +hibernate.search.default.indexBase=aRandomValue +hibernate.search.default.indexName=aRandomValue +hibernate.search.default.index_flush_interval=aRandomValue +hibernate.search.default.index_metadata_complete=aRandomValue +hibernate.search.default.indexmanager=aRandomValue +hibernate.search.default.indexwriter.=aRandomValue +hibernate.search.default.locking_strategy=aRandomValue +hibernate.search.default.max_queue_length=aRandomValue +hibernate.search.default_null_token=aRandomValue +hibernate.search.default.reader.=aRandomValue +hibernate.search.default.retry_marker_lookup=aRandomValue +hibernate.search.default.sharding_strategy=aRandomValue +hibernate.search.default.sharding_strategy.nbr_of_shards=aRandomValue +hibernate.search.default.similarity=aRandomValue +hibernate.search.default.worker.backend=aRandomValue +hibernate.search.default.worker.execution=aRandomValue +hibernate.search.default.worker.=aRandomValue +hibernate.search.elasticsearch.analysis_definition_provider=aRandomValue +hibernate.search.elasticsearch.log.json_pretty_printing=aRandomValue +hibernate.search.elasticsearch.scroll_backtracking_window_size=aRandomValue +hibernate.search.elasticsearch.scroll_fetch_size=aRandomValue +hibernate.search.elasticsearch.scroll_timeout=aRandomValue +hibernate.search.enable_dirty_check=aRandomValue +hibernate.search.error_handler=aRandomValue +hibernate.search.filter.cache_docidresults.size=aRandomValue +hibernate.search.filter.cache_strategy=aRandomValue +hibernate.search.generate_statistics=aRandomValue +hibernate.search.index_uninverting_allowed=aRandomValue +hibernate.search.indexing_strategy=aRandomValue +hibernate.search.jmx_bean_suffix=aRandomValue +hibernate.search.jmx_enabled=aRandomValue +hibernate.search.lucene.analysis_definition_provider=aRandomValue +hibernate.search.lucene_version=aRandomValue +hibernate.search.model_mapping=aRandomValue +hibernate.search.query.database_retrieval_method=aRandomValue +hibernate.search.query.object_lookup_method=aRandomValue +hibernate.search.similarity=aRandomValue +hibernate.search.worker.*=aRandomValue + + +hibernate.search.index-name.elasticsearch.dynamic_mapping=aRandomValue +hibernate.search.index-name.elasticsearch.index_management_wait_timeout=aRandomValue +hibernate.search.index-name.elasticsearch.index_schema_management_strategy=aRandomValue +hibernate.search.index-name.elasticsearch.refresh_after_write=aRandomValue +hibernate.search.index-name.elasticsearch.required_index_status=aRandomValue +hibernate.search.index-name.exclusive_index_use=aRandomValue +hibernate.search.index-name.directory_provider=aRandomValue +hibernate.search.index-name.indexBase=aRandomValue +hibernate.search.index-name.indexName=aRandomValue +hibernate.search.index-name.index_flush_interval=aRandomValue +hibernate.search.index-name.index_metadata_complete=aRandomValue +hibernate.search.index-name.indexmanager=aRandomValue +hibernate.search.index-name.indexwriter.=aRandomValue +hibernate.search.index-name.locking_strategy=aRandomValue +hibernate.search.index-name.max_queue_length=aRandomValue +hibernate.search.index-name.reader.=aRandomValue +hibernate.search.index-name.retry_marker_lookup=aRandomValue +hibernate.search.index-name.sharding_strategy=aRandomValue +hibernate.search.index-name.sharding_strategy.nbr_of_shards=aRandomValue +hibernate.search.index-name.similarity=aRandomValue +hibernate.search.index-name.worker.backend=aRandomValue +hibernate.search.index-name.worker.execution=aRandomValue +hibernate.search.index-name.worker.=aRandomValue \ No newline at end of file diff --git a/rules/rules-reviewed/hibernate/tests/data/hibernate-search/pom.xml b/rules/rules-reviewed/hibernate/tests/data/hibernate-search/pom.xml new file mode 100644 index 000000000..1e4969ac9 --- /dev/null +++ b/rules/rules-reviewed/hibernate/tests/data/hibernate-search/pom.xml @@ -0,0 +1,93 @@ + + + 4.0.0 + + org.example + a-test + 1.0-SNAPSHOT + + + + org.hibernate + hibernate-search + 5.11.11.Final + pom + + + + + org.hibernate + hibernate-search-elasticsearch + 5.11.0.Final + + + + + org.hibernate + hibernate-search-orm + 5.11.0.Final + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + prepare-package + + copy-dependencies + + + ${project.build.directory}/classes/lib + false + false + true + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + + + + + lib/ + + + + + + org.jboss.windup + windup-maven-plugin + 0.7.0 + + + com.acme + + true + + + + + + + 11 + 11 + + + \ No newline at end of file diff --git a/rules/rules-reviewed/hibernate/tests/hibernate-search.windup.test.xml b/rules/rules-reviewed/hibernate/tests/hibernate-search.windup.test.xml new file mode 100644 index 000000000..1b0a0a5f6 --- /dev/null +++ b/rules/rules-reviewed/hibernate/tests/hibernate-search.windup.test.xml @@ -0,0 +1,1098 @@ + + + + data/hibernate-search + ../hibernate-search.windup.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file