Hi all,

I'm currently working on extend our (a little old) Stanbol java client [1] to fully support EntityHub and ContentHub services. I'm facing a weird problem with ContentHub Featured Search REST service [2]. I was trying to get the results in JSON, but it seems that the only way to do it is only accepting text/html. I have tested it with curl, with only one document about Paris:

With /curl -i -H "Accept:application/json" "http://192.168.1.21:8080/contenthub/contenthub/search/featured?queryTerm=paris"/ the server returns this response:

{
    "documents": [{
"localid": "urn:content-item-sha1-8a8643d8c42d6c3d36aeffb1f7698126d30a014f",
        "mimetype": "text\/plain",
        "title": "Paris",
        "enhancementcount": 24
    }],
    "facets": [],
    "relatedkeywords": [{"paris": []}]

As you can see, any facet is returned. If you pass Accept:text/html in the header, now it's is possible to get facets and HTML+javascript to use them:

/curl -i -H "Accept:text/html" "http://192.168.1.21:8080/contenthub/contenthub/search/featured?queryTerm=paris"/

I suppose that the facets should be also in JSON response. Am I wrong?

Thanks!

[1] - https://github.com/zaizi/apache-stanbol-client
[2] - http://dev.iks-project.eu:8081/contenthub/contenthub/search/featured

--

------------------------------
This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.

Zaizi Ltd is registered in England and Wales with the registration number 6440931. The Registered Office is 222 Westbourne Studios, 242 Acklam Road, London W10 5JJ, UK.

Reply via email to