Hi,

An extra tip, on top of everything that Erick said:

Add an extra field to all documents, that contains the date the document was 
indexed. That way, you can always compare the solr documents on different 
machines, and quickly see what "version" exists on each machine.

And you don't have to add this date to the document data yourself, you can make 
solr do it for you:

In your schema.xml, add a field like this:

<field name="indexationtime" type="tdate" indexed="true" stored="true" 
omitNorms="true" multiValued="false" />

(The tdate is a regular solr.TrieDateField.)

And then in your solrconfig.xml, add this to the beginning of your 
updateRequestProcessorChain definition:

<processor class="solr.TimestampUpdateProcessorFactory">
        <str name="fieldName">indexationtime</str>
</processor>


/Jimi
________________________________________
From: tedsolr <tsm...@sciquest.com>
Sent: Friday, April 22, 2016 8:48 PM
To: solr-user@lucene.apache.org
Subject: Replicas for same shard not in sync

I have a SolrCloud setup with v5.2.1 - just two hosts. A ZK ensemble of 3
hosts. Just today, customers searching in one specific collection reported
seeing varying results with the same search. I could confirm this by looking
at the logs - same search with different hits by the solr host. In the admin
console I see that the Replication section on one node is highlighted -
drawing your attention to a version and generation difference between
listing of "master" and "slave".

The shard has the same number of docs on each host, they are just at
different generations. What's the proper way to re-sync? Should I restart
the host with the out of sync collection? Or click the "optimize" button for
the one shard? Or reload the collection? Do I need to delete the replica and
build a new one?

Thanks!



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Replicas-for-same-shard-not-in-sync-tp4272236.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to