Best practices for combining Lucene.NET and a relational database?
Posted
by FlySwat
on Stack Overflow
See other posts from Stack Overflow
or by FlySwat
Published on 2009-06-13T14:48:01Z
Indexed on
2010/03/19
6:51 UTC
Read the original article
Hit count: 510
lucene.net
I'm working on a project where I will have a LOT of data, and it will be searchable by several forms that are very efficiently expressed as SQL Queries, but it also needs to be searched via natural language processing.
My plan is to build an index using Lucene for this form of search.
My question is that if I do this, and perform a search, Lucene will then return the ID's of matching documents in the index, I then have to lookup these entities from the relational database.
This could be done in two ways (That I can think of so far):
- N amount of queries (Horrible)
- Pass all the ID's to a stored procedure at once (Perhaps as a comma delimited parameter). This has the downside of being limited to the max parameter size, and the slow performance of a UDF to split the string into a temporary table.
I'm almost tempted to mirror everything into lucenes index, so that I can periodicly generate the index from the backing store, but only need to access it for the frontend.
Advice?
© Stack Overflow or respective owner