[annotator-dev] (no subject)

Randall Leeds tilgovi at hypothes.is
Tue Jul 2 21:00:10 UTC 2013


Oh, I think I see what's happening.

You need to run an annotator store of some kind. The annotator does not
work against the raw ElasticSearch API.

I can tell you are pointing it directly at ElasticSearch because your index
is called 't2' and your prefix URL has port :9200.

The Store protocol is slightly different from raw ElasticSearch and a Store
server is meant to sit between Annotator and ElasticSearch to address
authentication and authorization.

The okfn/annotator-store repository is the reference implementation.


On Tue, Jul 2, 2013 at 1:57 PM, Randall Leeds <tilgovi at hypothes.is> wrote:

> Are you using the reference annotator-store server or some custom one?
>
> The snippet you pasted, is that the data in elasticsearch? Or from the
> JavaScript console?
>
> When you say the data is stored, how do you know?
>
> Is there any error on create, or only on update/delete?
>
>
> On Tue, Jul 2, 2013 at 1:35 PM, pascal coucou <pascalcoucou123 at hotmail.fr>wrote:
>
>> Hello
>> happy to meet you , I'm new in annotator
>>
>> I have a warning message when I put data to my local elasticsearch server
>> :
>>
>> Warning: No ID returned from server for annotation
>>  Object {ranges: Array[1], quote: "a. Cras in mi at felis", text: "", uri
>> : "http://localhost/demo1.html", highlights: Array[1]}
>>
>>    1. _id: "mSZvggL7THWJf4qoUUDNew"
>>    2. _index: "t2"
>>    3. _type: "annotations"
>>    4. _version: 1
>>    5. highlights: Array[1]
>>    6. ok: true
>>    7. quote: "a. Cras in mi at felis"
>>    8. ranges: Array[1]
>>    9. text: ""
>>    10. uri: "http://localhost/demo1.html"
>>    11. __proto__: Object
>>
>>
>> The data is save on the server but update delete and read cannot run
>>
>> this is my configuration
>>
>> content.annotator('addPlugin', 'Store', {
>>   urls: {
>>     // These are the default URLs.
>>     create:  '/annotations',
>>     read:    '/annotations/:id',
>>     update:  '/annotations/:id',
>>     destroy: '/annotations/:id',
>>     search:  '/_search'
>>   },
>>       // The endpoint of the store on your server.
>>       prefix: 'http://192.168.40.128:9200/t2',
>>
>>       // Attach the uri of the current page to all annotations to allow
>> search.
>>       annotationData: {
>>         'uri': window.location.href
>>       },
>>
>>       // This will perform a "search" action rather than "read" when the
>> plugin
>>       // loads. Will request the last 20 annotations for the current url.
>>       // eg. /store/endpoint/search?limit=20&uri=
>> http://this/document/only
>>       loadFromSearch: {
>>         'limit': 20,
>>         'uri': window.location.href
>>       }
>> })};
>>
>> so if someone can help me why
>> thanks
>>
>> pascal coucou
>>
>> _______________________________________________
>> annotator-dev mailing list
>> annotator-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/annotator-dev
>> Unsubscribe: http://lists.okfn.org/mailman/options/annotator-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20130702/7cf0b4e3/attachment-0002.html>


More information about the annotator-dev mailing list