Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Q></strong> How do I make the index transactionally consistent with the DB?<br> <strong>A></strong> You can't. You can probably invent another transaction layer on top, but it will take ages to develop and you won't reach 100% consistency anyway. You could, for example, send data both to the DB and Solr and only commit after both data arrives but this will not be atomic.</p> <p><strong>Q></strong> Is there any way to store the index in the (relational) DB?<br> <strong>A></strong> With Lucene 4.0, you probably can (by writing your own codec). But this won't solve your problem.</p> <p><strong>Q></strong> When configured as a cluster, does each cluster node need to maintain it's own copy of the index?<br> <strong>A></strong> Yes.</p> <p><strong>Q></strong> It is not clear whether multiple instances of Solr can update a single index or not.<br> <strong>A></strong> Multiple Lucene/Solr instances can't write to the same index file(s). Max you can do is to create multiple <code>IndexSearcher</code>s. But this is probably done at Solr level anyway.</p> <p><strong>Q></strong> do we give up accept that the index is not guaranteed to be consistent?<br> <strong>A></strong> Yes. I think you are too db-centric. Think about Solr/Lucene as you think about Google - I bet they don't roll out their entire index atomically throughout the world. If search results will have minor inconsistencies depending which server you hit (for a few seconds of course), it's not a big deal.</p> <p><strong>Q</strong>> rebuild it every day or so? What do people normally do about this?<br> <strong>A></strong> Lucene has <a href="http://wiki.apache.org/lucene-java/NearRealtimeSearch" rel="noreferrer">near-real time search</a> but at the basic level you just send index updates and commit as db changes happen, then reopen the index reader to see these updates. This is all done automagically in Solr.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload