Solr is an open source enterprise search server based on the Lucene Java search library, with XML/HTTP and JSON APIs, hit highlighting, faceted search, caching, replication, and a web administration interface. This charm deploys Solr in the Java servlet container Jetty.
This charm is designed to be deployed as the backend to a second charm, its interface should not be exposed directly as there are no controls over who can update the stored data.
juju deploy solr-jetty
juju set solr-jetty "schema=$(base64 < my-schema.xml)"
juju set solr-jetty "acceptors=20"
juju set solr-jetty java-min-heap-mb=256 java-max-heap-mb=512
juju set solr-jetty volume-map="{solr-jetty/0: /dev/vdb}" volume-ephemeral=false
juju set solr-jetty volume-map="{solr-jetty/0: /dev/rbd/solr-jetty/solr}" volume-ephemeral=false juju add-relation solr-jetty ceph
curl http://:8080/solr/update --data-binary @mem.xml -H 'Content-type:text/xml; charset=utf-8' curl http://:8080/solr/update --data-binary '' -H 'Content-type:text/xml; charset=utf-8'
curl http://:8080/solr/select?q=memory
echo '
<fields>
<field name="id" type="string" indexed="true" stored="true" required="true" />
<field name="name" type="string" indexed="true" stored="true"/>
<field name="description" type="textgen" indexed="true" stored="true" default="" />
</fields>
<uniqueKey>id</uniqueKey>
<defaultSearchField>description</defaultSearchField>
' > snack-schema.xml
juju set solr-jetty "schema=$(base64 < snack-schema.xml)"
echo ' 1 Chococapers Delicious caper flavoured chocolate snack 2 Chillimilk All the goodness of milk with a chilli twist 3 Caperyogurt Thick yogurt infused with caper goodness ' > snack-data.xml
curl http://:8080/solr/update --data-binary @snack-data.xml -H 'Content-type:text/xml; charset=utf-8' curl http://:8080/solr/update --data-binary '' -H 'Content-type:text/xml; charset=utf-8'
curl 'http://:8080/solr/select?q=caper'
- Deploy Solr 4.x
- Deploy with Solr Cloud
- Manage cluster config within Zookeeper