Skip to content

Instantly share code, notes, and snippets.

@jgeek
Last active May 30, 2016 11:05
Show Gist options
  • Save jgeek/f5e823b67d78dbf7cade904b28882230 to your computer and use it in GitHub Desktop.
Save jgeek/f5e823b67d78dbf7cade904b28882230 to your computer and use it in GitHub Desktop.
apache solr
# foreground and verbous
$ solr start -f -p 81 -V
# create core
$ ./solr create -c hellosolr
# -m heap size
$ solr start -p 8983 -h localhost -m 4g
# create core from sample config
$ ./solr create –c hellosolr -d sample_techproducts_configs -p 8983
# status of core from rest:
http://localhost:port/solr/admin/cores?action=STATUS
http://localhost:port/solr/admin/cores?action=STATUS&core=<corename>
$ Unload and Delete Core:
http://localhost:port/solr/admin/cores?action=UNLOAD&core=<corename>
options: deleteIndex=true, deleteDataDir=true, and deleteInstanceDir=true
# Setting Solr Home
• Start the Solr script with the –s or –solr.home option: $ ./solr start -s /home/solr
• Set the SOLR_HOME property in the solr.in environment file:
SOLR_HOME=/home/solr (*nix)
set SOLR_HOME=D:\playground\solr (Windows)
You can verify the path of SOLR_HOME in the Solr admin UI by looking for -Dsolr.solr.home in the JVM
args section. Alternatively, you can run the solr script for getting the status: $ ./solr status
# Memory Management
• Set the SOLR_JAVA_MEM property in the solr.in environment file: SOLR_JAVA_MEM="-Xms1024m -Xmx1024m"
• Start Solr with the –m option. With this option, you can set –Xms and –Xmx to be only the same size:
solr start –m 1g
# Solr articles:
http://www.andornot.com/blog/post/Advanced-autocomplete-with-Solr-Ngrams-and-Twitters-typeaheadjs.aspx
http://solr.pl/en/2010/10/18/solr-and-autocomplete-part-1/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment