This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate Search in Action: Where does it fit in? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Search in Action: Where does it fit in?" Watch "Hibernate Search in Action: Where does it fit in?" New topic
Author

Hibernate Search in Action: Where does it fit in?

Don Stadler
Ranch Hand

Joined: Feb 10, 2004
Posts: 451
I've been digging a little into data mining and the intelligent web with the help of two other Manning books. It seems clear that Hibernate Search fits into the data mining space, but where?

Does it provide an ORM data mining capability?

Thanks,

Don
John Griffin
author
Greenhorn

Joined: Oct 24, 2008
Posts: 22
Don,

No, in the strictest sense it does not. It provides the ability to do extensible full text search against a database. That's what it was designed to do and that what it does well.

Hope this helps.

John G
Don Stadler
Ranch Hand

Joined: Feb 10, 2004
Posts: 451
Originally posted by John Griffin:
Don,

No, in the strictest sense it does not. It provides the ability to do extensible full text search against a database. That's what it was designed to do and that what it does well.

Hope this helps.

John G


Yes, that does help. Thank you. I subscribed to the Manning promotion last week and took advantage of the 50% discount on e-books. I almost bought your book then but decided to go for Algorithms of the Intelligent Web, mostly because I wasn't sure where Hibernate Search fit into the search/data mining space. So this book is on my short list now.

What is the scope of the search that Hibernate Search does? Obviously into the various kinds of char and varchar, but does the search cover things like Blobs, large text types, the XML types provided by some DB's, etc? Does it use HQL or another mechanism to construct the searches?
[ December 11, 2008: Message edited by: Don Stadler ]
Emmanuel Bernard
author
Ranch Hand

Joined: Oct 22, 2008
Posts: 62
A full-text search is all about searching strings but you can often find a string representation for a datab structure that makes sense for example date in absolute format.

Hibernate Search does support amost java types form the JDK and lets you write custom bridges to convert a structure into a string representation indxed into Lucene. chatper 4 covers Bridges.

A few examples:
- reads a byte[] representing the PDF, extract the text and index it
- read a MS Word file from a URL, extract the text and index it
- take a Map and store it in a way that makes search easier for you
Don Stadler
Ranch Hand

Joined: Feb 10, 2004
Posts: 451
Originally posted by Emmanuel Bernard:
A full-text search is all about searching strings but you can often find a string representation for a datab structure that makes sense for example date in absolute format.

Hibernate Search does support amost java types form the JDK and lets you write custom bridges to convert a structure into a string representation indxed into Lucene. chatper 4 covers Bridges.

A few examples:
- reads a byte[] representing the PDF, extract the text and index it
- read a MS Word file from a URL, extract the text and index it
- take a Map and store it in a way that makes search easier for you


Thank you Emmanuel, that sounds downright useful. So one could use a date as part of the search criteria, and pick up a string from within a PDF or a Map?

Any numeric search capability, or would that be asking too much?

[ December 11, 2008: Message edited by: Don Stadler ]
Emmanuel Bernard
author
Ranch Hand

Joined: Oct 22, 2008
Posts: 62
Yes you can search numbers and range of numbers.
The catch is to store them in a way to make numeric comparison equivalent to String comparison

2 < 12 but "2" > "12"

The idea is to put non significant zeros
"002" < "012"

You can do that with a custom bridge. There are examples of that (of various flexibility) in chapter 4.
Don Stadler
Ranch Hand

Joined: Feb 10, 2004
Posts: 451
Emmanuel,

Thank you, that helps.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Hibernate Search in Action: Where does it fit in?