1) A collection is simply a logical group and can consist of multiple
cores. The core is a representation of a single physical index or part of
an index. Both cores and collections can be created in local as well as
cloud modes.
2) Sharding is performed to distribute your index over multiple machines
when the index becomes too big for one machine.
So if you have a 10TB index and 10 machines each with 1TB of disk space
then you'll divide your index into 10 shards and put those 10 shards on
your 10 machines.
"But when indexing a document in one shard,it gets reflected in every shard
of that collection"
This is what happens only logically, meaning you can query any one shard
for a doc that might be on another and you'll still get the proper results.
Physically, one doc is only present on one shard, which is determined by
the hash value of the doc id at index time.
3) The main purpose of replication is to provide redundancy. When you're
running solr on cloud mode with multiple shards and one of your shards goes
down, your entire cluster will stop responding. In such a case a replica
for such a shard will serve as a backup and take over the responsibilities
of that shard.
This will keep your app running.

What I've written above is a very coarse grained view of all these concepts.
You should take a look at the wiki pages to gain a better fuller
understanding of these concepts.

On Wed, 6 Jan 2016, 17:00 vidya <vidya.nade...@tcs.com> wrote:

> Hi
>
> I am new to solr. i have a doubt in understanding difference between core
> and collection.
> >As far as i understand, cores can be created when solr is run in local
> mode
> and collections in solrCloud.
> Can you please help me if i am wrong.
> >And why do we shard a collection? i read like -
> When your data is too large for one node, you can break it up and store it
> in sections by creating one or more shards. Each is a portion of the
> logical
> index, or core, and it's the set of all nodes containing that section of
> the
> index.
> But when indexing a document in one shard,it gets reflected in every shard
> of that collection. But main intention of creating shard is to break up the
> data.
> >Why do we replicate a collection?
>
> Thanks in advance
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/core-Collection-Shard-Replication-tp4248850.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
-- 
Regards,
Binoy Dalal

Reply via email to