jQuery in Action, 3rd edition
The moose likes Other Open Source Projects and the fly likes Lucene In action Full text Search on DB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Lucene In action Full text Search on DB" Watch "Lucene In action Full text Search on DB" New topic

Lucene In action Full text Search on DB

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi Authors,

I havent use Lucene but can it be used to provide full text search on database also and not just files?
If so are all objects in the database can be access by Lucene also and what are the security features when doing the search?

I have another question but this is a little trivial, but would like to hear from you.
Most of the files that we have are stored in database as Blob format.

We actually thought of before if File System saving is better than the Blob Format but
due to the argument that RDBMS provides better security feature so we decided to use Blob format.

I do think that this is the price we have to pay since we opted for Blob because I think Lucene
cannot access it because its non-text? Is this right?
I havent use Lucene but is there a way to incorporate Lucene with this scenario?

Thanks and good luck to your book!

Sean Clark ---> I love this place!!!
Me ------> I definitely love this place!!!
Lester Burnham

Joined: Oct 14, 2008
Posts: 1337
Lucene can be used to provide search on any object you can think of -static files, a DB, dynamic web sites, etc.- because the logic to index the content is provided by the developer. It would be up to you to extract the pieces of data from a DB that you want Lucene to be able to search and find, and feed those to the Lucene API during indexing. For various kinds of files you'll find indexers on the web, but for DBs it's a bit different since the schemas can vary so much. If a slightly more automated approach to this interests you, check out Hibernate Search.

As to your second question, Lucene doesn't access anything on its own. But if you can come up with the logic to extract indexable material from a Blob, then you can certainly use Lucene to create an index for that.
Ankit Garg

Joined: Aug 03, 2008
Posts: 9462

There was a kind of similar discussion here on using Lucene to search in Database...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I agree. Here's the link: http://aspose.com/file-tools
subject: Lucene In action Full text Search on DB
It's not a secret anymore!