lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: Replicas for same shard not in sync
Date Sat, 23 Apr 2016 18:37:34 GMT

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

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

From: tedsolr <>
Sent: Friday, April 22, 2016 8:48 PM
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?


View this message in context:
Sent from the Solr - User mailing list archive at

View raw message