Full Text Search with HQL?

719 views
Skip to first unread message

Matt Quackenbush

unread,
Sep 5, 2010, 1:52:01 PM9/5/10
to cf-or...@googlegroups.com
I am guessing that there is no way to do this, and my searches and reading has not turned up anything to indicate otherwise, but...

Is it possible to use SQL Server's FTS with HQL?

I am having an argument with myself as to whether it's best for me to stick to good ol' SQL for a search function or to use HQL.  I _really_ love the convenience of paged objects being returned to me with HQL, but I don't like the limited search capabilities of a WHERE clause, not to mention how slow it is compared to FTS.

Any thoughts or suggestions would be greatly appreciated.  Thanks in advance.

Matt Quackenbush

unread,
Sep 5, 2010, 2:55:34 PM9/5/10
to cf-or...@googlegroups.com
Hmm, so after toying around with a bunch of keyword combinations, it appears that HQL does indeed support FTS.  However, I am not quite grasping if/how the posts I am reading apply to the CF9 ORM flavor of Hibernate.

http://www.javalobby.org/articles/hibernatequery102/

Matt Quackenbush

unread,
Sep 5, 2010, 3:44:46 PM9/5/10
to cf-or...@googlegroups.com
And here is the link to the Hibernate Search project.

http://www.hibernate.org/subprojects/search.html

I still have not found any CF9 examples of FTS.  If you know of any, I'd appreciate the link(s).  :-)

todd sharp

unread,
Sep 5, 2010, 4:06:00 PM9/5/10
to cf-or...@googlegroups.com

I've been indexing data with SOLR and doing search with cfsearch. Then I pass a list of matching IDs to ORM and use it as an in list in my HQL. That way I can do paging, etc.



--
You received this message because you are subscribed to the Google Groups "cf-orm-dev" group.
...

Matt Quackenbush

unread,
Sep 5, 2010, 4:28:45 PM9/5/10
to cf-or...@googlegroups.com
Todd,

Interesting approach.  I've never used SOLR.  I guess I should do some more searching.  :-)

(If you have links and/or examples....)

todd sharp

unread,
Sep 5, 2010, 4:30:35 PM9/5/10
to cf-or...@googlegroups.com

Check rays blog for SOLR examples. I'll post some links later.

--
You received this message because you are subscribed to the Google Groups "cf-orm-dev" group.

To post to this group, send email to cf-or...@googlegroups.com.
To unsubscribe from this group, se...

Mark Mandel

unread,
Sep 5, 2010, 6:32:27 PM9/5/10
to cf-or...@googlegroups.com
Todd -

That pretty much how Hibernate search works under the hood ;o)

Mark

To post to this group, send email to cf-or...@googlegroups.com.
To unsubscribe from this group, send email to cf-orm-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cf-orm-dev?hl=en.



--
E: mark....@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia
http://www.cfobjective.com.au

Hands-on ColdFusion ORM Training
www.ColdFusionOrmTraining.com

Matt Quackenbush

unread,
Sep 5, 2010, 6:53:52 PM9/5/10
to cf-or...@googlegroups.com
Mark,

Is the Hibernate Search functionality available in CF9?  Perhaps you have a snippet that shows how to dig into the underlying Java to handle it?

Mark Mandel

unread,
Sep 5, 2010, 7:44:04 PM9/5/10
to cf-or...@googlegroups.com
I've never done it with CF9.

In theory it may be possible, but you would probably need to use hbmxml mappings, manually drop in the hibernate search jar into ColdFusion's lib dir, and also have a custom Hibernate config as well.

Give it a shot, let us know how it goes :)

Mark


On Mon, Sep 6, 2010 at 8:53 AM, Matt Quackenbush <quack...@gmail.com> wrote:
Mark,

Is the Hibernate Search functionality available in CF9?  Perhaps you have a snippet that shows how to dig into the underlying Java to handle it?

--
You received this message because you are subscribed to the Google Groups "cf-orm-dev" group.
To post to this group, send email to cf-or...@googlegroups.com.
To unsubscribe from this group, send email to cf-orm-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cf-orm-dev?hl=en.

Brian Kotek

unread,
Sep 5, 2010, 10:30:57 PM9/5/10
to cf-or...@googlegroups.com
Might be worth adding an enhancement request to the CF issue tracker so that Adobe knows that people would be interested in seeing this added in a future version.
Reply all
Reply to author
Forward
0 new messages