[Registry-dev] extensible searching API

Sanjiva Weerawarana sanjiva at wso2.com
Thu Sep 27 14:42:52 PDT 2007


Jonathan Marsh wrote:
> Sorry to be late catching up on this.
> 
> If all queries return resources (mashups, users, tags, comments), do I have
> to go outside the query language to return a calculated value like "average
> rating"?  If so, is it still reasonably possible to execute queries like "My
> mashups which my friends have rated (on average) 4 or higher?"  i.e. where a
> calculated value is part of an intermediate query result?

No- that's also a "resource" .. basically if you execute the query 
/queries/mashups-which-my-friends-have-rated-4-or-higher then the result 
will be a collection of resource. In other words, with Paul's variation of 
the query proposal, the query itself becomes the resource that represents 
the computed value.

Same goes for average rating- the query becomes the resource which has a 
representation in text/plain with the number 3.1415.

> I don't think we need to expose this level of searchability to end users
> right now, but I'm interested in a model that will allow the UI to execute
> some pretty sophisticated general purpose queries as well as expose some
> query "templates" to the user through a search form.

Absolutely +1 - if we have the API right then we can choose to expose 
whatever part of that as the remote HTTP API. That's what I believe what 
"expose this level of searchability to end users" means.

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
email: sanjiva at wso2.com; cell: +94 77 787 6880; fax: +1 509 691 2000

"Oxygenating the Web Service Platform."



More information about the Registry-dev mailing list