[ckan-dev] ckan api: remove ES stuff?
casbon at gmail.com
Fri Apr 27 11:20:03 BST 2012
On 26 April 2012 23:38, Rufus Pollock <rufus.pollock at okfn.org> wrote:
> On 26 April 2012 16:52, James Casbon <casbon at gmail.com> wrote:
> > Hi All,
> > First of all thanks for fixing the CORS requests issues that were preventing
> > me using the data api in a JS app. But... is it possible to remove (what
> > looks like) the search meta information from the results.
> simple answer is: no :-)
> We intentionally return exactly what ElasticSearch gives us so that
> you can a) use libraries designed for ES with CKAN Data API b) you can
> switch seamlessly between CKAN data API and ES (if you want to work
> I know it is slightly annoying but it's a tiny amount of data and you
> can just do data.hits to get the stuff immediately.
I think this is wrong because:
1. I don't care about ES, I wanted to use CKANs API and I normally
expect things to be simple where they can be (i.e. RESTish).
2. If I can just return hits, then you can. One place (on the server)
versus all the places (on the clients).
3. You are committing yourself to maintain the ES metadata if you drop
ES as a backend, otherwise you will break the clients (this is a bad
design decision IMO)
Also, I would really like it to be able to just get the resource
without any limits. This would work for most small datasets.
should not return 'No handler found for uri
[/ckan-www.ckan.net/b9aae52b-b082-4159-b46f-7bb9c158d013/] and method
It should return the JSON representation of the resource or a paging
link if the resource is too large
More information about the ckan-dev