An Annotorious storage plugin for ElasticSearch (for demo purposes, mostly)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Annotorious ElasticSearch Plugin

A simple Annotorious plugin that stores annotations on an ElasticSearch server. This plugin is meant primarily for demo purposes, and as an example for those interested in building their own storage plugins. I strongly advise against using this plugin in any kind of production environment. (Contributions to make it production ready are always welcome though ;-)

This plugin is licensed under the WTFPL.

Using this Plugin

Simply download the script, copy it to your server/Webspace and set it up with your page as described below.

  1. The plugin uses jQuery. Therefore you need to import jQuery before importing the plugin script.
  2. Add the plugin script to your page just like any other Annotorious plugin. Make sure the plugin script is loaded after the main Annotorious script.
  3. Attach the plugin to Annotorious using the anno.addPlugin API method.
  4. Specify the base URL of the ElasticSearch server using a base_url config param.


    <!-- Import main Annotorious script and CSS -->
    <link rel="stylesheet" href="" type="text/css" />
    <script src=""></script>
    <!-- Import jQuery - the ElasticSearch plugin depends on it! -->
    <script src="jquery-1.9.0.min.js"></script>
    <!-- Import the plugin script -->
    <script src="my-scripts/anno-elasticsearch-plugin.js"></script>
    <!-- Use Annotorious' JavaScript API to attach and activate the plugin -->
      anno.addPlugin('ElasticSearch', { base_url: '' });

Hacking on this Plugin

There is a test page in this project at /test/test.html. Simply open this test page in your browser and you're ready to go.

A word of caution: the test page points to my dev ElasticSearch server. Feel free to use that to hack & test away. But be aware that I'm not making any guarantees in terms of uptime and availability. Also, I'm occasionally flushing the server which means annotations will be lost without notice.