开发者

Best way to implement a keyword search from a MySQL CLOB or VARCHAR column

开发者 https://www.devze.com 2023-04-08 08:20 出处:网络
I have to implement 开发者_StackOverflowa keyword search from a CLOB column in my MySQL / JPA project.

I have to implement 开发者_StackOverflowa keyword search from a CLOB column in my MySQL / JPA project.

I know that I can use a JPA query something like SELECT something FROM something WHERE..., but are there any other 'Enterprise' way of doing this?

(I am asking this question keeping Hibernate search in mind, but there seems to be no equivalent for Hibernate search in JPA)


What do you mean under "enterprise"-way? Hibernate is pretty enterprisish as most of Fortune-500 companies actually use that in one or another way. Though latest Hibernate Search version is still in beta, that's probably not what most of the enterprises will accept. But there is a stable release you can probably use.

And you can still use Apache Lucene to index your CLOBs and search in the index instead of DB. That's what basically Hibernate Search is also doing under the hood. And that's the aproach used by many companies.

UPDATE: I never used Hibernate Search as a separate product and what they say in their documentation is that Hibernate Core is a requirement. But you can still try plain Lucene instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消