lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Lucene with Relational Databases
Date Tue, 25 May 2010 22:40:04 GMT
This kind of search is really effective with Lucene, but you will have to
denormalize your data into documents which then have to be indexed by
Lucene.  This isn't massively hard, but there is some serious thought that
needs to go into the denormalization.

That denormalization step would create one document for each kind of object
you would like to search for.  That document would contain all of the
referenced material that you might like to include in your query.  For your
application, it sounds like you might like to retrieve customers and orders.
 A customer should probably have a list of recent products ordered, orders
should list the customer and the products.  Each document should also
include a document type so you can add that to your queries to limit what
you find.

If you dump these denormalized documents to a fairly standard XML format,
you can bring up a copy of Solr and be searching your data within a few tens
of minutes.  It is definitely worth the experiment so that you understand
some of the possibilities.

On Tue, May 25, 2010 at 1:24 PM, josh45 <joshhoy45@gmail.com> wrote:

> I have a relational database for example I have the tables, orders,
> products, and customers.  The relationship is in orders has a product id
> and
> customer id.  My issue is I would like to enter in something like "Mike and
> printer" And have it return the the customer id and the printer id.  Pretty
> bad example I know but I think it gets the point across.  If this can be
> done or can not with Lucene I would love to know.  If I need to go into
> anymore detail please let me know I would be glad to.  Thanks again, I know
> its a poor question but I would love to know the answer or now where to get
> the answer!
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message