Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed on Lucene

 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Does anyone know how to use Lucene for querrying a database based on some search criteria?
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jothi Shankar Kumar Sankararaj:
Hi Guys,

Does anyone know how to use Lucene for querrying a database based on some search criteria?


With Lucene you dont query a database or anything but the index.
If you want to query a database, you might as well use SQL or Hibernate or anything suitable.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe Hibernate Search goes into the right direction? It integrates Lucene search with databases.
 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys!

But the problem is our persistence model uses EJB 2.x Entity beans. So any idea on how to use a search engine for my purpose?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you be more specific on what you're trying to do that SQL can't?

As Maneesh said, Lucene has no built-in capability to index a database. It can be used to search an index once it has been created, but you'd have to write the code to index a DB first. Not a big deal, but just be aware that's what you'll need to do.
[ August 07, 2008: Message edited by: Ulf Dittmer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic