A. Never optimize on the slave.
B. You probably do not need to optimize on the master.

"Optimize" does not optimize anything. It is forced merge, combining segments. 
Solr automatically combines segments as needed.

wunder

On May 26, 2012, at 1:57 PM, sudarshan wrote:

> Hi All,
>       I happen to see this message board just now. I want to clarify
> certain things. I'm new to Solr. I'm trying to combine Solr's index
> replication and optimization. I have some doubts about the working of
> replication in a master slave setup. 
> 
> From the post, I understand that if the index is not optimized, only the
> modified segments are transferred from the master to slave. I have two
> scenarios.
> 
> 1. Optimizing the index only in the master and replicating the optimized
> index to the slave - from my understanding this would copy the whole index
> every time (pol interval).
> 
> 2. Optimizing the index only in the slave. From my testing, I observed that
> slave replaces its optimized index with that of the masters non-optimized
> index during every replication (poll interval). So even if the index has not
> changed in the master, if the slave tries to optimize after every
> replication, sooner it will be replaced by the masters index - based on my
> observations. 
> 
> Questions:
> From my opinion, if at all I want to optimize, doing it in master and
> replicating optimized index to slaves would be more sensible. Am I right? 
> 
> 1.Is there a way to combine optimization along with replication? 
> 2. I could not understand when merging of indexes would be useful. I believe
> that master and slave should always have a consistent view of the index
> which is what replication guarantees. So why should I merge index? 
> 3. If I have to optimize either in the master or in the slave, will the
> entire index be copied always to slave? 
> 4. During replication, I found that the size of the index and the number of
> files in the index are different in the master and slave. Still they were in
> sync. Do they have some internal meta data calculations to find the
> difference (number of files per index version) between the master and the
> slave to initiate replication? 
> 
> Your suggestions/guidance would me very helpful to get a clear
> understanding. Please help.
> 
> Thanks,
> Sudarshan 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Is-optimize-needed-on-slaves-if-it-replicates-from-optimized-master-tp3241604p3986259.html
> Sent from the Solr - User mailing list archive at Nabble.com.




Reply via email to