Deleting all documents from the local index:
curl http://localhost:8983/solr/update?commit=true -H "Content-Type: text/xml" --data-binary '*:*'
Adding documents to a remote index:
java -Durl=http://ec2-...amazonaws.com:8983/solr/update -jar post.jar
Installing:
- http://www.shayanderson.com/linux/install-solr-on-ubuntu-1104-server.htm#comment-524855678
- Build both Solr (ant clean test) and the example (ant example)
- Make sure the appropriate port is opened in the EC2 security group
- To run Jetty/Solr as a background process:
/example$ java -jar start.jar &
- to daemonize, add to supervisor.conf:
[program:apache_solr] command=/path/to/my/scripts/folder/apache-solr-supervisor-run.sh
- make a script start the Solr .jar in Jetty:
#!/bin/bash # enter solr dir cd /path/to/my/apache-solr-1.4.1/installation # start solr java -jar start.jar
-
sudo chmod +x scriptName.sh
to make it executable
- Reload and restart supervisor processes
Schema notes:
UniqueKey field must be a string.
- Design schema for documents in collection
- Preprocess documents, write .xml
- POST .xml to server
- access with Sunburnt from Tornado