File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Lucene In action Full text Search on DB

 
Mark Reyes
Ranch Hand
Posts: 426
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Lester Burnham
Rancher
Posts: 1337
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 9495
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was a kind of similar discussion here on using Lucene to search in Database...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic