solrctl instancedir --generate $HOME/label_collection_config
solrctl --zk 134.191.209.235:2181/solr instancedir --create label_collection_config $HOME/label_collection_config
solrctl --zk 134.191.209.235:2181/solr collection --create label_collection -s 5 -c label_collection_config
- cp solr/example/solr/collection1 solr/example/solr/collection2
- rm solr/example/solr/collection2/data
- core.properties # name=collection2
- change schema.xml doc src-code
Official documentation for different versions Solr REST API admin
TIP: investigate request/response of the Solr UI
- wt=json
- wt=xml
curl -i -k --negotiate -u: https://134.190.200.9:8983/solr/admin/info/system?wt=xml
curl -i -k --negotiate -u: https://134.190.200.9:8983/solr/admin/info/system?wt=json
curl 134.190.200.9:8983/solr/admin/info/system?wt=json
curl -s localhost:8983/solr/admin/cores?wt=json
curl -i -k --negotiate -u: https://34.91.11.49:8985/solr/admin/collection_labels
request to server with https
curl -i -k --negotiate -u: https://localhost:8983/solr/admin/cores?wt=json
curl localhost:8983/solr/admin/collections?action=LIST&wt=json
http://localhost:8983/solr/collection1/update?commit=true
- xml
curl http://localhost:8983/solr/update?commit=true -H "Content-Type: text/xml" --data-binary '<add><doc><field name="id">10010</field><field name="title">title #10010</field></doc></add>'
- json simple version
curl http://localhost:8983/solr/update?commit=true -H "Content-Type: text/json" --data-binary '[{"id":10011, "title": "title #10011"}]'
- json full request
curl http://localhost:8983/solr/update?commit=true -H "Content-Type: text/json" --data-binary '{"add":{ "doc":{"id":"1021","title":"title 1021"},"boost":1.0,"overwrite":true,"commitWithin":1}}'
- json POST request
curl -X POST http://localhost:8983/solr/collection1/update?commit=true -H "Content-Type: text/json" --data '{"add":{ "doc":{"id":"1023","title":"title 1023"},"boost":1.0,"overwrite":true,"commitWithin":1}}'
- json POST request with external file
curl -i -k --negotiate -u: https://34.91.11.49:8985/solr/label_collection/update -H "Content-type:application/json" --data @/home/user1/solr_test_data/test_label.json
- xml
curl http://localhost:8983/solr/select?q=*:*
- json
curl -X GET -H "Accept: application/json, text/javascript" "http://localhost:8983/solr/collection1/select?q=*%3A*&wt=json&indent=true&_=1537470880014"
curl http://localhost:8983/solr/collection1/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'
curl localhost:8985/solr/admin/cores?action=UNLOAD&deleteInstanceDir=true&core=collection1
-
-Dsolr.admin.port=8984 SOLR_PORT
-
-Dsolr.port=8985 SOLR_ADMIN_PORT
-
-Dsolr.solr.home=/var/lib/solr
-
spark-shell example
spark2-shell --deploy-mode client --executor-memory 16G --num-executors 50 \
--jars spark-solr-3.5.5-shaded.jar \
--conf "spark.executor.extraJavaOptions=Djavax.net.ssl.trustStore=/home/user1/truststore.jks -Djavax.net.ssl.trustStorePassword=${TRUSTSTORE_PASSWORD} -Djava.security.auth.login.config=/home/user1/kerberos/jaas-client.conf"
- log: /var/log/solr/
- conf: /etc/solr/conf
- collection conf: /home/solr_deploy_eq_s/solr_deploy/labelsCollection/conf/schema.xml