How to start Solr Cloud collection without -e -cloud - solr

I use Solr Cloud for my project and I always start it with bin/solr start -e -cloud that always prompt all the questions for making a new collection or re-use one.
But is there a command that can directly start the collection I want, like bin/solr start [collectionName] -cloud -p 8983?
I didn't find anything in the Solr Manual.
Thanks :)

All collections are available by default, so starting Solr in cloud mode should be enough.
bin/solr start -c
The default port is 8983, so there is no need to give the -p parameter unless you're changing it.

Related

Configure Solr home directory instead using -s in bin/solr start command

How can I configure the solr home path?
It works for me if I using the -s option in the start command:
bin/solr start -s /opt/solr/server/xy
But I want that solr use the home folder "/opt/solr/server/xy" also when I start solr WITHOUT the -s option like this:
sudo service solr start
I had configure in bin/solr.in.sh -> SOLR_HOME=/opt/xy/apps/solr/server/xy but when I restart (stop and start) solr the admin panel shows me: solr.solr.home /var/solr/data - which is wrong.
I also try to change the SOLR_HOME entry in the /etc/default/solr.in.sh file but that didn't work either
In the default file there were 2 entries that were overwritten.
It is the case that the "SOLR_HOME entry" in the "/etc/default/solr.in.sh" file has to be overwritten.

How to add a new machine to an already running solrCloud?

So, I have two instance of solr node running along with a embedded zookeeper on a single machine using the link Set up solrCloud. Now I want to add a new machine to this cluster. I run bin\solr start -cloud -s ./solr -h newMachineIP -p 9000 -z oldMachineIP:9983. It shows successful startup, but when I create a new collection it gives me an error saying "Server refused connection at: http://newMachineIp:9000/solr"
just a guess but... does C:\path\to\di‌​r\solr-7.1.0\solr-7.‌​1.0\server\solr\gett‌​ingstarted contain any spaces? If so, install Solr into a path with no spaces, this has been an issue before in Windows, and it's possible it still is in some code paths. Solr on Windows get much less testing than on linux.

docker of solr and nutch working together?

I'm trying to activate nutch and solr as dockers out of the box to consume that in REST.
Tried
same docker - started it with
docker run --name nutch_solr -d -p 8899:8899 -p 8983:8983 -t momer/docker-solr-nutch:4.6.1
can't surf to ..:8983, or ...:8899
Tried different dockers - nutch and solr
started it with:
docker run --name my_nutch -d -p 8899:8899 -e SOLRURL=192.168.99.100:8983 -t meabed/nutch
Solr is up and running, but can't really work with nutch (my question)
tried more another nutch docker - what am I missing? I'd like to write a post on how to raise solr and nutch dockers in 5 minutes, but I just can't seem to work with it..
so, does someone know how to activate it including send a sample of crawling job for work?

Solr insatnces/nodes in solr Cloud not linking

I am trying to setup Solr cloud with multiple instance(s), all on one machine my zookeeper ensemble is runing on local machine.
for first instance
bin/solr start -c -s $INSATNCE_DIR -p $solrport -z localhost:2181,localhost:2182,localhost:2183 -Dsolr.log=/logs -Dsolr.install.dir=/solr-5.4.0 -V -Dbootstrap_conf=true
and for other instance
bin/solr start -c -s $INSATNCE_DIR -p $solrport -z localhost:2181,localhost:2182,localhost:2183 -Dsolr.log=/logs -Dsolr.install.dir=/solr-5.4.0 -V -Dbootstrap_conf=false
all works fine, but each of these instance admin interface under cloud>Tree only lists one live node
localhost:8983_solr
not the other instances.
This is causing issue when i am creating collection to be distributed to nodeSet.
Anyone has any idea whats am i doing wrong?

How does solr loads configsets in examples provided by solr?

I have started learning solr.I have downloaded the latest zip(5.1.0) provided by solr and run the server using bin/solr start -e cloud -noprompt.
I check that this internally calls
bin/solr start -cloud -s example/cloud/node1/solr -p 8983
bin/solr start -cloud -s example/cloud/node2/solr -p 7574 -z localhost:9983
I check that these is no config(conf/solrconfig.xml) defined in example/cloud/node1/solr so how does solr load config from the SOLR_HOME/configsets directory?
I read the documentation on several places but i am still unable to figure out the use of cloud like in 'bin/solr start -cloud -s ... ' and use of zookeeper.
Please help.
when you are working on solr cloud with zookeeper, you have to upload your solr config on zookeeper.
./bin/solr zk -upconfig -z localhost:2181,localhost:2182,localhost:2182 -n my-config -d server/solr/files/conf/
using upconfig you can upload your solr config, only have to provide path of your config directory.
You can use config name(my-config) for create core using api.
http://XXX.XXX.XXX.XXX:8983/solr/admin/collections?action=CREATE&name=irTest&numShards=3&replicationFactor=2&maxShardsPerNode=3&collection.configName=my-config
So it will create core using your config only.
Download the latest version of the Apache solr reference guide.
https://www.apache.org/dyn/closer.cgi/lucene/solr/ref-guide/apache-solr-ref-guide-5.1.pdf
check this section in the PDF.
Configuration Directories and SolrCloud
Since you are not specifying a specific configset, the default is loaded.
First, if you don't provide the -d or -n options, then the default
configuration ($SOLR_HOME/server/solr/con
figsets/data_driven_schema_configs/conf) is uploaded to ZooKeeper
using the same name as the collection

Resources