[owncloud-devel] OCA.Search: JS-based search results

Georg Ehrke developer at georgehrke.com
Mon Apr 25 08:05:33 GMT 2016


Hey,

I’m currently working on the search capabilities of the calendar app.
Due to the app’s nature we need to generate the search results in JavaScript.

OCA.Search provides three kinds of functions an app can register: filters, renderers, handlers

A filter is called when the search input changes and the app is supposed to filter its current view based on the query.
As far as I can tell from the code filters are not supposed to generate a list of search results and the result of the filter function is simply ignored.

Renderers and handlers both require some server side code, so it’s not suitable in my use case.

Is there an ‘official’ way to generate a list of search results in JavaScript?

If not, what to do about it?
Overwriting OCA.Search.search(…) won’t work, because showResults and addResults are private functions.
Just implement my own OCA.Search?

One thing I noted during investigating this issue:
Our developer documentation is really lacking information about public JS APIs.
Now I’m familiar with ownCloud’s code base, but new app developers are really left behind here. :/

Cheers,
Georg


More information about the Devel mailing list