Support Questions

Find answers, ask questions, and share your expertise

How to create a collection for SolrCloud on Solr 5.2.0?

avatar
Explorer
 
1 ACCEPTED SOLUTION

avatar

Have a few examples here for a lab we built. We are looking to get the existing Solr tutorial updated:

https://gist.github.com/abajwa-hw/675b01c152e9fac8d3c2

https://gist.github.com/abajwa-hw/86ec17a6f0b3542fd4a9

Collection1 should not longer be used in Solr 5.x, its a bug in sandbox

Also make sure to change owner of all files under solr log dir to solr on sandbox. It has some files owned by root which causes problems.

More details available in docs: http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.0/bk_search/index.html

Sample steps

On non-sandbox, you can install/setup Solr this way (not needed on sandbox):

yum install -y lucidworks-hdpsearch
sudo -u hdfs hadoop fs -mkdir /user/solr
sudo -u hdfs hadoop fs -chown solr /user/solr

Then run below sample steps to start Solr in cloud mode and create collection

#only needed on current sandbox
chown -R solr:solr /opt/lucidworks-hdpsearch/solr  
su solr
/opt/lucidworks-hdpsearch/solr/bin/solr start -c -z localhost:2181
/opt/lucidworks-hdpsearch/solr/bin/solr create -c tweets \
   -d data_driven_schema_configs \
   -s 1 \
   -rf 1 

View solution in original post

3 REPLIES 3

avatar
Explorer

The default 'Collection1' is no longer included, so I'm trying to create a simple collection so that I can start sending data and indexing it.

avatar

Have a few examples here for a lab we built. We are looking to get the existing Solr tutorial updated:

https://gist.github.com/abajwa-hw/675b01c152e9fac8d3c2

https://gist.github.com/abajwa-hw/86ec17a6f0b3542fd4a9

Collection1 should not longer be used in Solr 5.x, its a bug in sandbox

Also make sure to change owner of all files under solr log dir to solr on sandbox. It has some files owned by root which causes problems.

More details available in docs: http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.0/bk_search/index.html

Sample steps

On non-sandbox, you can install/setup Solr this way (not needed on sandbox):

yum install -y lucidworks-hdpsearch
sudo -u hdfs hadoop fs -mkdir /user/solr
sudo -u hdfs hadoop fs -chown solr /user/solr

Then run below sample steps to start Solr in cloud mode and create collection

#only needed on current sandbox
chown -R solr:solr /opt/lucidworks-hdpsearch/solr  
su solr
/opt/lucidworks-hdpsearch/solr/bin/solr start -c -z localhost:2181
/opt/lucidworks-hdpsearch/solr/bin/solr create -c tweets \
   -d data_driven_schema_configs \
   -s 1 \
   -rf 1 

avatar
Explorer

Exactly what I was looking for ! Thanks Ali !