Hibernate Search 5.7.0 Final 发布了,Hibernate Search 的作用是对数据库中的数据进行检索的。它是 hibernate 对著名的全文检索系统 Lucene 的一个集成方案,作用在于对数据表中某些内容庞大的字段(如声明为text的字段)建立全文索引,这样通过 hibernate search 就可以对这些字段进行全文检索后获得相应的 POJO,从而加快了对内容庞大字段进行模糊搜索的速度( sql 语句中 like 匹配)。 更新内容: 一般改进 HSEARCH-2574: when it makes sense, you can now repeat Hibernate Search annotations on a single attribute/method. For example, if you want to add two index fields on the same title attribute, you can write: @Field(analyzer = @Analyzer(definition = "myAnalyzer")
@Field(name = "title_sort", analyzer = @Analyzer(definition = "myAnalyzerForSort")
private String title;
Thus you don’t have to use the composite annotations (@Fields ) anymore. But of course, those are still available. HSEARCH-2588: some methods in the Sort DSL allowed to specify the sort field type explicitly, which was useful when sorting on fields added through custom field bridges. We improved support for MetadataProvidingFieldBridge , so that you now only need to implement this interface on your custom field bridges, and won’t need anything special when using the sort DSL anymore. As a result, the byField(String, SortField.Type) and andByField(String, SortField.Type) methods in the sort DSL have been deprecated. HSEARCH-2587: an NPE could occur when using the Sort DSL to sort on embedded (@IndexedEmbedded ) fields; this is now fixed. HSEARCH-2576: unnecessary memory allocations within queries have been removed, resulting in better query throughput. And several improvements for other solutions integrating Hibernate Search, like HSEARCH-2597, HSEARCH-2561, HSEARCH-2418 or HSEARCH-2585.
Elasticsearch-specific 改进 HSEARCH-2453: Elasticsearch authentication is now fully implemented: there are dedicated username and password properties so that you don’t need to embed the credentials in the URL anymore. HSEARCH-2593: when using automatic node discovery on Elasticsearch, a scheme (HTTP or HTTPS) cannot be detected automatically for newly discovered nodes; by default it is HTTP. You can now customize this to use HTTPS instead: just add hibernate.search.default.elasticsearch.discovery.default_scheme https to your configuration. HSEARCH-2590: queries using pagination could allocate too much memory in certain circumstances; this is now fixed.
更多请查看完整发行日志 |