Solr: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
mNo edit summary
Brian Wilson (talk | contribs)
mNo edit summary
Line 1: Line 1:
Solr is a search platform built on Lucene
[http://lucene.apache.org/solr/ Apache Solr] is a search platform built on Apache Lucene.


I have [https://store.docker.com/images/f4e3929d-d8bc-491e-860c-310d3f40fff2?tab=description official Solr] running in a Docker container.
I have official Solr 8.0.0 running in a Docker container.
I am learning how to put data into it now.


When I try to create a core in the web admin page, it just spits error messages at me.
== Docs ==
I was able to use the command line,


docker exec -it --user=solr my_solr solr create_core -c gettingstarted
I've been watching this guy's videos. https://factorpad.com/tech/solr/tutorial/solr-tutorial.html


When I restarted the docker instance the core is gone.
[https://hub.docker.com/_/solr/ official Solr Docker repo]
 
== Docs ==


[https://hub.docker.com/_/solr/ official Solr Docker repo]
[https://www.apache.org/dyn/closer.cgi/lucene/solr/ref-guide/ Solr Reference Guide]; includes getting started instructions.


[http://lucene.apache.org/solr/ Solr Home Page]
== How are docker volumes used? ==


[https://www.apache.org/dyn/closer.cgi/lucene/solr/ref-guide/ Solr Reference Guide], a PDF document; includes getting started instructions.
I am keeping solr's data in a volume that can be found at /home/docker/volumes/solr_data/_data on [[Bellman]].
It's mounted at /var/lib/solr in the container.


== Where's the web server? ==
== Where's the web server? ==


If I log into the Virtualbox instance then I can do "ifconfig eth1" to find the ip address and "netstat -an" to find the port.
I have it running behind my firewall right now at https://solr.wildsong.biz/.  
The port changes when you restart solr. Currently I see it on 32770.
 


== How do I get shell access? ==
== How do I get shell access? ==


You go to Kitematic and click on "Exec" and it will open a Terminal window with a shell prompt. At least it does with Solr.
To get a bash shell,
 
[[File:kitematic_exec.png]]
 
You can also go to the console in VirtualBox, but this gets you into the machine where Docker is running, not into the solr container. But you can run docker commands there.


[[File:docker_console.png]]
docker exec -it --user=solr solr bash


This worked to create the "gettingstarted" core.
"Cores" are the setups containing data and configuration. This worked to create the "taxlots" core.


  docker exec -it --user=solr solr bin/solr create_core -c gettingstarted
  docker exec -it --user=solr solr bin/solr create_core -c taxlots

Revision as of 18:38, 13 May 2019

Apache Solr is a search platform built on Apache Lucene.

I have official Solr 8.0.0 running in a Docker container. I am learning how to put data into it now.

Docs

I've been watching this guy's videos. https://factorpad.com/tech/solr/tutorial/solr-tutorial.html

official Solr Docker repo

Solr Reference Guide; includes getting started instructions.

How are docker volumes used?

I am keeping solr's data in a volume that can be found at /home/docker/volumes/solr_data/_data on Bellman. It's mounted at /var/lib/solr in the container.

Where's the web server?

I have it running behind my firewall right now at https://solr.wildsong.biz/.

How do I get shell access?

To get a bash shell,

docker exec -it --user=solr solr bash

"Cores" are the setups containing data and configuration. This worked to create the "taxlots" core.

docker exec -it --user=solr solr bin/solr create_core -c taxlots