Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a new collection in Solr using command line

Tags:

solr

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 ?

like image 554
Tushar Goswami Avatar asked Dec 19 '22 18:12

Tushar Goswami


2 Answers

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!

like image 78
Rahul Avatar answered Feb 12 '23 23:02

Rahul


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.

like image 29
Tushar Goswami Avatar answered Feb 13 '23 00:02

Tushar Goswami