I know that are a few ways to create Solr collections. One using Solr Admin UI webpage. Another using Collections API
But How do I create collection in Solr using COMMAND LINE ?
Navigate to the folder where you copied solr binary files. And type the following from terminal : bin/solr create_core -c name_of_core_or_collection
This command line utilizes the Collections API for you - to create a new core.
Let's suppose you have download and placed the Solr binaries at the location /opt/apps/solr
, then you can create a collection in the following manner.
cd /opt/apps/solr/bin
./solr create -c {collectionName} -n {configName} -p 8983
Done!
For creating a collection when you are running in cloud mode, use create_collection command.. ie
solr create_collection -c myCollection
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.