Support Questions

Find answers, ask questions, and share your expertise

What's the difference between a collection in Solr and Java? Or are they the same?

Contributor

Your thoughts will be helpful.

Keerthana

1 ACCEPTED SOLUTION

@keerthana gajarajakumar

I don't think that they are same.

Solr Collection: A complete logical index in a SolrCloud cluster. It is associated with a config set and is made up of one or more shards. If the number of shards is more than one, it is a distributed index, but SolrCloud lets you refer to it by the collection name and not worry about the shards parameter that is normally required forDistributedSearch.

The Java collections framework gives the programmer access to prepackaged data structures as well as to algorithms for manipulating them. A collection is an object that can hold references to other objects. The collection interfaces declare the operations that can be performed on each type of collection.

View solution in original post

5 REPLIES 5

Contributor

Collection: A complete logical index in a SolrCloud cluster. It is associated with a config set and is made up of one or more shards. If the number of shards is more than one, it is a distributed index, but SolrCloudlets you refer to it by the collection name and not worry about the shards parameter that is normally required for DistributedSearch.

  • Replica: One copy of a shard. Each replica exists within Solr as a core. A collection named "test" created with numShards=1 and replicationFactor set to two will have exactly two replicas, so there will be two cores, each on a different machine (or Solr instance). One will be named test_shard1_replica1 and the other will be named test_shard1_replica2. One of them will be elected to be the leader.
  • Shard: A logical piece (or slice) of a collection. Each shard is made up of one or more replicas. An election is held to determine which replica is the leader. This term is also in the General list below, but there it refers to Solr cores. The SolrCloud concept of a shard is a logical division.

https://wiki.apache.org/solr/Solrj

Contributor

I guess so Neeraj .

@keerthana gajarajakumar

I don't think that they are same.

Solr Collection: A complete logical index in a SolrCloud cluster. It is associated with a config set and is made up of one or more shards. If the number of shards is more than one, it is a distributed index, but SolrCloud lets you refer to it by the collection name and not worry about the shards parameter that is normally required forDistributedSearch.

The Java collections framework gives the programmer access to prepackaged data structures as well as to algorithms for manipulating them. A collection is an object that can hold references to other objects. The collection interfaces declare the operations that can be performed on each type of collection.

Contributor

Thanks for the clarification. Appreciate it!