Hi,

In my project I have one leader and one replica architecture.
I am using custom code( using DocumentUpdateProcessorFactory) for merging
old documents with incoming new documents.

eg. 1. if 1st document have 10 fields, all 10 fields will be indexed.
      2. if 2nd document have 8 fields, 5 of which are in old document and
3 are in new document, then we will find the old document in index(using
solrJ), then update the 5 fields of old document and add the new 3 fields
with old document and hence we have total 13 updated fields in result
document.

When I am pointing to leader and do indexing, I am not facing any issues.
But if I point to replica, then I am facing issues. since document
distribution from replica to leader and again to replica is taking time.

Eg. If first document comes in replica at time t1, then the distribution to
leader happens at t2 and then the leader distributes it to replica at time
t3. But the second in-coming document is coming before t3 and hence the
custom code is not able to find its old document for merge.

Hence, I need to know whether there is any simple way to query leader
directly using solrj other than finding the leader using zookeeper and then
hitting http url?

Notes: We are using SOLR 5.5 and i tried using zookeeper but zookeeper is
distributing the query.

Please let me know if any queries.

Thanks,
Indhupriya.S

Reply via email to