lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: How to update a particular document on multi-shards configuration?
Date Thu, 06 Jun 2013 00:06:20 GMT
That's what SolrCloud was invented for - fully-distributed indexing where 
any update can be sent to any node.

With non-SolrCloud distributed Solr, YOU, the developer are responsible for 
figuring out what node a document should be sent to, both for updates and 
for the original insertion. The point is that you get to decide how the node 
will be chosen.

So, go ahead and come up with your own function that takes one of your 
unique keys and generates a shard number. A simple approach is to hash the 
key, and take the low bits modulo the number of shards.

-- Jack Krupansky

-----Original Message----- 
From: bbarani
Sent: Wednesday, June 05, 2013 7:58 PM
Subject: How to update a particular document on multi-shards configuration?

I have 5 shards that has different data indexed in them (each document has a
unique id).

Now when I perform dynamic updates (push indexing) I need to update the
document corresponding to the unique id that is needs to be updated but I
wont know which core that corresponding document is present in.

I can do a search across all the shards for that unique id and get back the
document but I am not sure how to get the core information corresponding to
that document (unless I index that info, also this method requires one extra
search to find the document).

Is there a way to automatically push the document to proper core based on
unique id? I am  not using solrcloud yet, just the basic sharding. I know
this might not be possible without solrcloud feature, just thought of
getting your inputs..

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

View raw message