Skip to content

Instantly share code, notes, and snippets.

@uyilmaz
Created February 24, 2021 12:39
Show Gist options
  • Save uyilmaz/95e817e6f4c86bd2cf83d73a3cff02a8 to your computer and use it in GitHub Desktop.
Save uyilmaz/95e817e6f4c86bd2cf83d73a3cff02a8 to your computer and use it in GitHub Desktop.
solr koleksiyon yaratma scripti
#!/bin/bash
host="http://herhangiBirHost:8983"
collectionName="koleksiyonAdi"
numShards=1
tlogReplicas=1
maxShardsPerNode=1
createNodeSet="host1:8983_solr,host1:8984_solr,host2:8983_solr,host2:8984_solr,host3:8983_solr,host4:8984_solr"
schema="schemaAdi_v2"
curl --location --request POST "${host}/solr/admin/collections" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "action=CREATE" \
--data-urlencode "name=${collectionName}" \
--data-urlencode "numShards=${numShards}" \
--data-urlencode "tlogReplicas=${tlogReplicas}" \
--data-urlencode "maxShardsPerNode=${maxShardsPerNode}" \
--data-urlencode "createNodeSet=${createNodeSet}" \
--data-urlencode "collection.configName=${schema}" \
--data-urlencode "waitForFinalState=true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment