[Registry-dev] Extensible search API - coming back
Chathura C. Ekanayake
chathura at wso2.com
Sun Sep 23 23:28:34 PDT 2007
We have to finalize the extensible search API, as it is a blocker for
using registry for the mashup site.
We had this discussion earlier, but ended without a proper conclusion.
I like the idea proposed by Glen, which is to always return a collection
of resources.
Then we can use below API methods (with some modification to the API
proposed by Glen),
/**
* Queries can be stored in any path. If we want to support user specific
queries we can store them in a path similar to
"/users/chathura/my_top_rated_mashups".
* Then if someone (e.g. mashup site) wants to execute user specific
queries, he can execute the queries in the currently signed in user's path.
* i.e. we are supporting user specific queries by convention, not by logic.
*/
public void defineQuery(String queryPath, String query);
public Resource[] executeQuery(String queryPath, Object[] parameters);
In this approach we should represent all possible search results as
resources. Some possible search results are:
Normal resources
Comments
Tags
Ratings
Users
In all above types, we can put the main data part (e.g. comment text,
tag string, rating value) as the resource content and
put all other data as resource properties (e.g. number of taggings).
Thoughts ...
Thanks,
Chathura
More information about the Registry-dev
mailing list