tree: fd2fb42f0bb5f4dcd1658edfe473231f917c1af2 [path history] [tgz]
  1. README.md
docs/solr-collection/README.md

Solr Collections

Solr-operator can manage the creation, deletion and modification of Solr collections.

Collection creation requires a Solr Cloud to apply against. Presently, SolrCollection supports both implicit and compositeId router types, with some of the basic configuration options including autoAddReplicas.

Create an example set of collections against on the “example” solr cloud

$ cat example/test_solrcollection.yaml

apiVersion: solr.bloomberg.com/v1beta1
kind: SolrCollection
metadata:
  name: example-collection-1
spec:
  solrCloud: example
  collection: example-collection
  routerName: compositeId
  autoAddReplicas: false
  numShards: 2
  replicationFactor: 1
  maxShardsPerNode: 1
  collectionConfigName: "_default"
---
apiVersion: solr.bloomberg.com/v1beta1
kind: SolrCollection
metadata:
  name: example-collection-2-compositeid-autoadd
spec:
  solrCloud: example
  collection: example-collection-2
  routerName: compositeId
  autoAddReplicas: true
  numShards: 2
  replicationFactor: 1
  maxShardsPerNode: 1
  collectionConfigName: "_default"
---
apiVersion: solr.bloomberg.com/v1beta1
kind: SolrCollection
metadata:
  name: example-collection-3-implicit
spec:
  solrCloud: example
  collection: example-collection-3-implicit
  routerName: implicit
  autoAddReplicas: true
  numShards: 2
  replicationFactor: 1
  maxShardsPerNode: 1
  shards: "fooshard1,fooshard2"
  collectionConfigName: "_default"
$ kubectl apply -f examples/test_solrcollections.yaml