You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by mcarcelen <mc...@isoco.com> on 2006/07/12 17:47:55 UTC
Lucene index database
Hi,
Can Lucene index a database? PostgreSQL, Mysql, Access ?
Thanks
Cheers
Teresa
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Lucene index database
Posted by "Michael J. Prichard" <mi...@mac.com>.
Hey there Teresa.
Short answer: Not directly.
Long answer: Lucene is a set of libraries built for indexing text and
then searching those indexes. Not sure what you mean by indexing a
database per se. You could write some code to get the records you want
from the database and then index those. For example, if you have a ton
of articles stored in a database you could grab those articles, pull the
text, index and then use the lucene index for searches. Once you found
something you wanted you could go back to the database for additional
information.
Hope this helps.
-Michael
mcarcelen wrote:
>Hi,
>Can Lucene index a database? PostgreSQL, Mysql, Access ?
>Thanks
>Cheers
>Teresa
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Lucene index database
Posted by Erick Erickson <er...@gmail.com>.
What Michael said :).
Re: Lucene index database
Posted by "Michael J. Prichard" <mi...@mac.com>.
Ha Erick,
we must have sent our responses at the same time :)
What Erick said :)
Erick Erickson wrote:
> This has been extensively discussed in the mail archive, I think a
> search of
> the archive would help you a lot.
>
> The short form is no. There's nothing built into Lucene to help you
> index a
> database. How would you define that anyway? <G>
>
> That said, you can write a program to extract data from the database and
> index that data. Depending on what you need to do, you can either store
> enough data in the index to satisfy searches, or store data in each
> "document" you index that allows you to "do the right thing" as far as
> the
> database is concerned to satisfy searches.
>
> Best
> Erick
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Lucene index database
Posted by Chris Lu <ch...@gmail.com>.
What Erick and Michael said are all correct, or the same. :)
What Lucene can do is search data that stored into Document objects.
Lucene is said to be able to search html, pdf, etc, but that's because
those formats are relatively fixed. You can easily tell title,
content, etc.
With database, which has more complicated and flexible structures. You
need to code to select data, retrieve content, save into Lucene index,
parse the queries, render the results, and also, keep the index in
sync with the database, etc.
You are welcome to try DBSight to save most of these repeated efforts.
Chris Lu
-------------------------------------
Lucene Search On Any Databases/Applications
http://www.dbsight.net
On 7/12/06, Erick Erickson <er...@gmail.com> wrote:
> This has been extensively discussed in the mail archive, I think a search of
> the archive would help you a lot.
>
> The short form is no. There's nothing built into Lucene to help you index a
> database. How would you define that anyway? <G>
>
> That said, you can write a program to extract data from the database and
> index that data. Depending on what you need to do, you can either store
> enough data in the index to satisfy searches, or store data in each
> "document" you index that allows you to "do the right thing" as far as the
> database is concerned to satisfy searches.
>
> Best
> Erick
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Lucene index database
Posted by Erick Erickson <er...@gmail.com>.
This has been extensively discussed in the mail archive, I think a search of
the archive would help you a lot.
The short form is no. There's nothing built into Lucene to help you index a
database. How would you define that anyway? <G>
That said, you can write a program to extract data from the database and
index that data. Depending on what you need to do, you can either store
enough data in the index to satisfy searches, or store data in each
"document" you index that allows you to "do the right thing" as far as the
database is concerned to satisfy searches.
Best
Erick