title: Best practices for combining Lucene.NET and a relational database?
body: <p>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.</p>
  
  <p>My plan is to build an index using Lucene for this form of search.</p>
  
  <p>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.</p>
  
  <p>This could be done in two ways (That I can think of so far):</p>
  
  <ul>
  <li>N amount of queries (Horrible)</li>
  <li>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.</li>
  </ul>
  
  <p>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.</p>
  
  <p>Advice? </p>